mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-25 04:24:43 -04:00
added shortcut for addLink (ctrl+k) (#921)
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
4459dc742f
commit
45cd5a9b89
4 changed files with 8 additions and 3 deletions
|
@ -24,7 +24,8 @@ export const Shortcut: React.FC = () => {
|
|||
'editor.help.shortcuts.italic': [modifierKey, <> + </>, <kbd>I</kbd>],
|
||||
'editor.help.shortcuts.underline': [modifierKey, <> + </>, <kbd>U</kbd>],
|
||||
'editor.help.shortcuts.strikethrough': [modifierKey, <> + </>, <kbd>D</kbd>],
|
||||
'editor.help.shortcuts.mark': [modifierKey, <> + </>, <kbd>M</kbd>]
|
||||
'editor.help.shortcuts.mark': [modifierKey, <> + </>, <kbd>M</kbd>],
|
||||
'editor.help.shortcuts.link': [modifierKey, <> + </>, <kbd>K</kbd>]
|
||||
}
|
||||
}
|
||||
return (
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
import CodeMirror, { Editor, KeyMap, Pass } from 'codemirror'
|
||||
import { isMac } from '../utils'
|
||||
import {
|
||||
addLink,
|
||||
makeSelectionBold,
|
||||
makeSelectionItalic,
|
||||
markSelection,
|
||||
|
@ -81,7 +82,8 @@ export const defaultKeyMap: KeyMap = !isMac
|
|||
'Ctrl-B': makeSelectionBold,
|
||||
'Ctrl-U': underlineSelection,
|
||||
'Ctrl-D': strikeThroughSelection,
|
||||
'Ctrl-M': markSelection
|
||||
'Ctrl-M': markSelection,
|
||||
'Ctrl-K': addLink
|
||||
}
|
||||
: {
|
||||
F9: suppressKey,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue