1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Lexical: Finished off baseline shortcut implementation

This commit is contained in:
Dan Brown
2024-08-20 14:54:53 +01:00
parent aa1fac62d5
commit dbb2fe3e59
7 changed files with 124 additions and 85 deletions

View File

@ -45,11 +45,12 @@ export function createPageEditorInstance(container: HTMLElement, htmlContent: st
const editor = createEditor(config);
editor.setRootElement(editArea);
const context: EditorUiContext = buildEditorUI(container, editArea, editWrap, editor, options);
mergeRegister(
registerRichText(editor),
registerHistory(editor, createEmptyHistoryState(), 300),
registerShortcuts(editor),
registerShortcuts(context),
registerTableResizer(editor, editWrap),
registerTableSelectionHandler(editor),
registerTaskListHandler(editor, editArea),
@ -89,7 +90,6 @@ export function createPageEditorInstance(container: HTMLElement, htmlContent: st
console.log(editor.getEditorState().toJSON());
};
const context: EditorUiContext = buildEditorUI(container, editArea, editWrap, editor, options);
registerCommonNodeMutationListeners(context);
return new SimpleWysiwygEditorInterface(editor);