mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 20:31:13 +00:00
Merge pull request #1750 from paradox460/main
Add support for Command (⌘) key shortcuts on Markdown text areas
This commit is contained in:
commit
6a62d48257
1 changed files with 1 additions and 1 deletions
|
@ -473,7 +473,7 @@ export class MarkdownTextArea extends Component<
|
||||||
// Keybind handler
|
// Keybind handler
|
||||||
// Keybinds inspired by github comment area
|
// Keybinds inspired by github comment area
|
||||||
handleKeyBinds(i: MarkdownTextArea, event: KeyboardEvent) {
|
handleKeyBinds(i: MarkdownTextArea, event: KeyboardEvent) {
|
||||||
if (event.ctrlKey) {
|
if (event.ctrlKey || event.metaKey) {
|
||||||
switch (event.key) {
|
switch (event.key) {
|
||||||
case "k": {
|
case "k": {
|
||||||
i.handleInsertLink(i, event);
|
i.handleInsertLink(i, event);
|
||||||
|
|
Loading…
Reference in a new issue