/** * @param {Editor} editor * @param {String} url */ function register(editor, url) { // Custom Image picker button editor.ui.registry.addButton('imagemanager-insert', { title: 'Insert an image', icon: 'image', tooltip: 'Insert an image', onAction() { window.ImageManager.show(function (image) { const imageUrl = image.thumbs.display || image.url; let html = ``; html += `${image.name}`; html += ''; editor.execCommand('mceInsertContent', false, html); }, 'gallery'); } }); } /** * @param {WysiwygConfigOptions} options * @return {register} */ export function getPlugin(options) { return register; }