]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/wysiwyg-editor.js
entity needs to be saved after image upload and associate
[bookstack] / resources / js / components / wysiwyg-editor.js
index c03c0d2aa4e8bba75b8206e7060d50bb4dc26f06..60a6743ea7679bdebb7100bd2c047e1b26101166 100644 (file)
@@ -412,6 +412,7 @@ class WysiwygEditor {
         this.loadPlugins();
 
         this.tinyMceConfig = this.getTinyMceConfig();
+        window.$events.emitPublic(elem, 'editor-tinymce::pre-init', {config: this.tinyMceConfig});
         window.tinymce.init(this.tinyMceConfig);
     }
 
@@ -654,6 +655,8 @@ class WysiwygEditor {
                 // Paste image-uploads
                 editor.on('paste', event => editorPaste(event, editor, context));
 
+                // Custom handler hook
+                window.$events.emitPublic(context.elem, 'editor-tinymce::setup', {editor});
             }
         };
     }