]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/wysiwyg-editor.js
Update code.js
[bookstack] / resources / js / components / wysiwyg-editor.js
index 05897c250dd52eb373e510f0bbad907ea1b39024..a32e78161649e6337ee45bb6d9ab76f8bbf5fc9c 100644 (file)
@@ -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();