]> BookStack Code Mirror - bookstack/blobdiff - resources/js/wysiwyg/index.ts
Lexical: Added common events support
[bookstack] / resources / js / wysiwyg / index.ts
index 469738e7fed93ca2c2969a0be470d746aeb568a3..e53b9b057dd416f1995ac326037b7151c71a3b1c 100644 (file)
@@ -8,6 +8,7 @@ import {getEditorContentAsHtml, setEditorContentFromHtml} from "./actions";
 import {registerTableResizer} from "./ui/framework/helpers/table-resizer";
 import {el} from "./helpers";
 import {EditorUiContext} from "./ui/framework/core";
+import {listen as listenToCommonEvents} from "./common-events";
 
 export function createPageEditorInstance(container: HTMLElement, htmlContent: string, options: Record<string, any> = {}): SimpleWysiwygEditorInterface {
     const config: CreateEditorArgs = {
@@ -47,6 +48,8 @@ export function createPageEditorInstance(container: HTMLElement, htmlContent: st
         registerTableResizer(editor, editWrap),
     );
 
+    listenToCommonEvents(editor);
+
     setEditorContentFromHtml(editor, htmlContent);
 
     const debugView = document.getElementById('lexical-debug');