1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-09 10:22:51 +03:00

Lexical: Added cell width fetching, Created custom row node

This commit is contained in:
Dan Brown
2024-08-09 11:24:25 +01:00
parent e8532ef4de
commit da54e1d87c
8 changed files with 172 additions and 61 deletions

View File

@@ -19,8 +19,8 @@ import {
} from "@lexical/table";
import {$getNodeFromSelection, $selectionContainsNodeType} from "../../../utils/selection";
import {$getParentOfType} from "../../../utils/nodes";
import {$isCustomTableCellNode} from "../../../nodes/custom-table-cell-node";
import {showCellPropertiesForm} from "../forms/tables";
import {$isCustomTableCellNode} from "../../../nodes/custom-table-cell";
import {$showCellPropertiesForm} from "../forms/tables";
import {$mergeTableCellsInSelection} from "../../../utils/tables";
const neverActive = (): boolean => false;
@@ -317,7 +317,7 @@ export const cellProperties: EditorButtonDefinition = {
context.editor.getEditorState().read(() => {
const cell = $getNodeFromSelection($getSelection(), $isCustomTableCellNode);
if ($isCustomTableCellNode(cell)) {
showCellPropertiesForm(cell, context);
$showCellPropertiesForm(cell, context);
}
});
},