1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Finished updating remainder of JS components to new system

This commit is contained in:
Dan Brown
2022-11-16 13:04:22 +00:00
parent db79167469
commit 3b8ee3954e
25 changed files with 164 additions and 214 deletions

View File

@ -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)));