1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-12-23 23:02:08 +03:00

Lexical: Updated task list to use/support old format

This commit is contained in:
Dan Brown
2024-07-30 14:42:19 +01:00
parent fe05cff64f
commit 13f8f39dd5
6 changed files with 192 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ import {el} from "./helpers";
import {EditorUiContext} from "./ui/framework/core";
import {listen as listenToCommonEvents} from "./common-events";
import {handleDropEvents} from "./drop-handling";
import {registerTaskListHandler} from "./ui/framework/helpers/task-list-handler";
export function createPageEditorInstance(container: HTMLElement, htmlContent: string, options: Record<string, any> = {}): SimpleWysiwygEditorInterface {
const config: CreateEditorArgs = {
@@ -47,6 +48,7 @@ export function createPageEditorInstance(container: HTMLElement, htmlContent: st
registerRichText(editor),
registerHistory(editor, createEmptyHistoryState(), 300),
registerTableResizer(editor, editWrap),
registerTaskListHandler(editor, editArea),
);
listenToCommonEvents(editor);