Lexical: Added base table support and started resize handling

This commit is contained in:
Dan Brown
2024-06-21 13:47:47 +01:00
parent 13d970c7ce
commit f47f7dd9d2
7 changed files with 115 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import {mergeRegister} from '@lexical/utils';
import {getNodesForPageEditor} from './nodes';
import {buildEditorUI} from "./ui";
import {setEditorContentFromHtml} from "./actions";
import {registerTableResizer} from "./ui/framework/helpers/table-resizer";
export function createPageEditorInstance(editArea: HTMLElement) {
const config: CreateEditorArgs = {
@ -21,6 +22,7 @@ export function createPageEditorInstance(editArea: HTMLElement) {
mergeRegister(
registerRichText(editor),
registerHistory(editor, createEmptyHistoryState(), 300),
registerTableResizer(editor, editArea),
);
setEditorContentFromHtml(editor, startingHtml);