X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/ee24635e06a8c01d751f80caba47c57f76e8989d..refs/pull/3918/head:/resources/js/wysiwyg/shortcuts.js diff --git a/resources/js/wysiwyg/shortcuts.js b/resources/js/wysiwyg/shortcuts.js index b42851a46..ef364ddad 100644 --- a/resources/js/wysiwyg/shortcuts.js +++ b/resources/js/wysiwyg/shortcuts.js @@ -44,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)));