Skip to content

Commit

Permalink
Added custom shortcuts to HedgeDoc editor
Browse files Browse the repository at this point in the history
  • Loading branch information
markfijneman committed Apr 12, 2024
1 parent f359e69 commit 56c50cf
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions front/public/hotkeys-iframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,3 +365,15 @@ hotkeys('ctrl+k, command+k', function (event) {

parent.postMessage('showSearchDialog', '*');
});

// Hotkeys for HedgeDoc CodeMirror editor
editor.setOption('extraKeys', {
'Ctrl-K': () => {
parent.postMessage('showSearchDialog', '*');
return false;
},
'Cmd-K': () => {
parent.postMessage('showSearchDialog', '*');
return false;
},
});

0 comments on commit 56c50cf

Please sign in to comment.