1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-27 06:01:54 +03:00

Added editor instance event hooks

As per #1721
This commit is contained in:
Dan Brown
2019-10-16 18:01:35 +01:00
parent b24279cc12
commit 76bd0fdfa6
4 changed files with 47 additions and 8 deletions

View 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});
}
};
}