X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/ad48cd3e48ab5b16932d8c38032b80af619f525f..refs/pull/2303/head:/resources/js/components/wysiwyg-editor.js diff --git a/resources/js/components/wysiwyg-editor.js b/resources/js/components/wysiwyg-editor.js index 05897c250..a32e78161 100644 --- a/resources/js/components/wysiwyg-editor.js +++ b/resources/js/components/wysiwyg-editor.js @@ -401,6 +401,11 @@ function listenForBookStackEditorEvents(editor) { editor.setContent(content); }); + // Insert editor content at the current location + window.$events.listen('editor::insert', ({html}) => { + editor.insertContent(html); + }); + // Focus on the editor window.$events.listen('editor::focus', () => { editor.focus();