X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/fd26f54b9954cc2a44d9f5f71e4258decf90558e..refs/pull/3918/head:/resources/js/wysiwyg/shortcuts.js diff --git a/resources/js/wysiwyg/shortcuts.js b/resources/js/wysiwyg/shortcuts.js index 8b51437f1..ef364ddad 100644 --- a/resources/js/wysiwyg/shortcuts.js +++ b/resources/js/wysiwyg/shortcuts.js @@ -16,6 +16,8 @@ export function register(editor) { editor.shortcuts.add('meta+e', '', ['codeeditor', false, 'pre']); editor.shortcuts.add('meta+8', '', ['FormatBlock', false, 'code']); editor.shortcuts.add('meta+shift+E', '', ['FormatBlock', false, 'code']); + editor.shortcuts.add('meta+o', '', 'InsertOrderedList'); + editor.shortcuts.add('meta+p', '', 'InsertUnorderedList'); // Save draft shortcut editor.shortcuts.add('meta+S', '', () => { @@ -42,7 +44,9 @@ export function register(editor) { // Link selector shortcut editor.shortcuts.add('meta+shift+K', '', function() { - window.EntitySelectorPopup.show(function(entity) { + /** @var {EntitySelectorPopup} **/ + const selectorPopup = window.$components.first('entity-selector-popup'); + selectorPopup.show(function(entity) { if (editor.selection.isCollapsed()) { editor.insertContent(editor.dom.createHTML('a', {href: entity.link}, editor.dom.encode(entity.name)));