X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/953402f2eb05e00f2aa8440084df17a16fc8e52a..refs/pull/3918/head:/resources/js/wysiwyg/config.js diff --git a/resources/js/wysiwyg/config.js b/resources/js/wysiwyg/config.js index acf5e1d52..d5ec20e26 100644 --- a/resources/js/wysiwyg/config.js +++ b/resources/js/wysiwyg/config.js @@ -73,7 +73,9 @@ function file_picker_callback(callback, value, meta) { // field_name, url, type, win if (meta.filetype === 'file') { - window.EntitySelectorPopup.show(entity => { + /** @type {EntitySelectorPopup} **/ + const selector = window.$components.first('entity-selector-popup'); + selector.show(entity => { callback(entity.link, { text: entity.name, title: entity.name, @@ -83,7 +85,9 @@ function file_picker_callback(callback, value, meta) { if (meta.filetype === 'image') { // Show image manager - window.ImageManager.show(function (image) { + /** @type {ImageManager} **/ + const imageManager = window.$components.first('image-manager'); + imageManager.show(function (image) { callback(image.url, {alt: image.name}); }, 'gallery'); }