]> BookStack Code Mirror - bookstack/blobdiff - resources/js/wysiwyg/shortcuts.js
Guest create page: name field autofocus
[bookstack] / resources / js / wysiwyg / shortcuts.js
index 8b51437f1d811959afba20ed9b766b4c98b44c5e..ef364ddadab16b1e95105e7218c4b742cb91a6e4 100644 (file)
@@ -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)));