Skip to content

Commit

Permalink
Merge pull request #106 from markfijneman/hedgedoc-editor-hotkeys-fix
Browse files Browse the repository at this point in the history
Fix custom shortcuts not working in HedgeDoc editor
  • Loading branch information
JJ-8 authored Apr 15, 2024
2 parents f359e69 + 56c50cf commit bc4a998
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 bc4a998

Please sign in to comment.