From 27fc28b7dc10009896e9f57fab97cd4052295c27 Mon Sep 17 00:00:00 2001 From: Palanikannan1437 <73993394+Palanikannan1437@users.noreply.github.com> Date: Fri, 19 Jan 2024 11:17:30 +0530 Subject: [PATCH] feat: added ability to toggle row and column header (not turned on by default) --- packages/editor/core/src/ui/extensions/table/table/icons.ts | 2 ++ .../editor/core/src/ui/extensions/table/table/table-view.tsx | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/editor/core/src/ui/extensions/table/table/icons.ts b/packages/editor/core/src/ui/extensions/table/table/icons.ts index c08710ec3..a98eeb4b3 100644 --- a/packages/editor/core/src/ui/extensions/table/table/icons.ts +++ b/packages/editor/core/src/ui/extensions/table/table/icons.ts @@ -2,6 +2,8 @@ export const icons = { colorPicker: ``, deleteColumn: ``, deleteRow: ``, + toggleColumnHeader: ``, + toggleRowHeader: ``, insertLeftTableIcon: ` editor.chain().focus().toggleHeaderColumn().run(), }, { @@ -176,7 +176,7 @@ function setTableRowBackgroundColor(editor: Editor, backgroundColor: string) { const rowsToolboxItems: ToolboxItem[] = [ { label: "Toggle Row Header", - icon: icons.insertBottomTableIcon, + icon: icons.toggleRowHeader, action: ({ editor }: { editor: Editor }) => editor.chain().focus().toggleHeaderRow().run(), }, {