mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-21 22:36:05 +08:00
@ -30,6 +30,12 @@ class MarkdownEditor {
|
||||
this.displayDoc = this.display.contentDocument;
|
||||
this.init();
|
||||
});
|
||||
|
||||
window.$events.emitPublic(elem, 'editor-markdown::setup', {
|
||||
markdownIt: this.markdown,
|
||||
displayEl: this.display,
|
||||
codeMirrorInstance: this.cm,
|
||||
});
|
||||
}
|
||||
|
||||
init() {
|
||||
|
@ -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});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user