mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-02-08 13:52:14 +00: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
|
@ -57,9 +57,10 @@ SPDX-License-Identifier: CC-BY-SA-4.0
|
|||
- Code blocks have a 'Copy code to clipboard' button.
|
||||
- Code blocks with 'vega-lite' as language are rendered as [vega-lite diagrams](https://vega.github.io/vega-lite/examples/).
|
||||
- Markdown files can be imported into an existing note directly from the editor.
|
||||
- The table button in the toolbar opens an overlay where the user can choose the number of columns and rows
|
||||
- The table button in the toolbar opens an overlay where the user can choose the number of columns and rows.
|
||||
- A toggle in the editor preferences for turning ligatures on and off.
|
||||
- Easier possibility to share notes via native share-buttons on supported devices.
|
||||
- Surround selected text with a link via shortcut (ctrl+k or cmd+k).
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
@ -195,6 +195,7 @@
|
|||
"underline": "Underline selection",
|
||||
"strikethrough": "Strike selection through",
|
||||
"mark": "Mark selection",
|
||||
"link": "Add link around selection",
|
||||
"view": "Show only View",
|
||||
"both": "Show View and Edit",
|
||||
"edit": "Show only Edit"
|
||||
|
|
|
@ -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…
Reference in a new issue