Skip to content

Commit

Permalink
Add key bindings (close #9)
Browse files Browse the repository at this point in the history
  • Loading branch information
indvd00m committed Dec 21, 2016
1 parent a6c685d commit 2fdf0c2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,15 @@ CKEDITOR.plugins.add('crossreference', {
}
}
});

// keystrokes

editor.setKeystroke(CKEDITOR.CTRL + CKEDITOR.SHIFT + 65, anchorDialogCmdName);
editor.setKeystroke(CKEDITOR.CTRL + CKEDITOR.SHIFT + 76, linkDialogCmdName);
editor.setKeystroke(CKEDITOR.CTRL + CKEDITOR.ALT + 85, updateCmdName);

// double click

editor.on('doubleclick', function(evt) {
if (evt.data.element && !evt.data.element.isReadOnly() && evt.data.element.getName() === 'a'
&& evt.data.element.hasAttribute('cross-reference')) {
Expand Down

0 comments on commit 2fdf0c2

Please sign in to comment.