mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-12-23 23:02:08 +03:00
Lexical: Added common events support
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user