]> BookStack Code Mirror - bookstack/blobdiff - resources/js/wysiwyg/ui/defaults/buttons/tables.ts
Lexical: Linked row properties form up
[bookstack] / resources / js / wysiwyg / ui / defaults / buttons / tables.ts
index 88ea56186ad39f396e5705af935eed722489cb0c..50353961f0ff47933a6e3d0da3ec7dad0851209e 100644 (file)
@@ -20,8 +20,9 @@ import {
 import {$getNodeFromSelection, $selectionContainsNodeType} from "../../../utils/selection";
 import {$getParentOfType} from "../../../utils/nodes";
 import {$isCustomTableCellNode} from "../../../nodes/custom-table-cell";
-import {$showCellPropertiesForm} from "../forms/tables";
+import {$showCellPropertiesForm, $showRowPropertiesForm} from "../forms/tables";
 import {$mergeTableCellsInSelection} from "../../../utils/tables";
+import {$isCustomTableRowNode} from "../../../nodes/custom-table-row";
 
 const neverActive = (): boolean => false;
 const cellNotSelected = (selection: BaseSelection|null) => !$selectionContainsNodeType(selection, $isCustomTableCellNode);
@@ -166,10 +167,10 @@ export const rowProperties: EditorButtonDefinition = {
                 return;
             }
 
-            const row = $getParentOfType(cell, $isTableRowNode);
-            const modalForm = context.manager.createModal('row_properties');
-            modalForm.show({});
-            // TODO
+            const row = $getParentOfType(cell, $isCustomTableRowNode);
+            if ($isCustomTableRowNode(row)) {
+                $showRowPropertiesForm(row, context);
+            }
         });
     },
     isActive: neverActive,