Major Changes
-
#3920 by @zbeyens – Major performance improvement: all table cells were re-rendering when a single cell changed. This is now fixed.
TablePlugin
now depends onNodeIdPlugin
.- Table merging is now enabled by default:
- Renamed
enableMerging
todisableMerge
. - Migration:
enableMerging: true
→ remove the option.- otherwise →
TablePlugin.configure({ options: { disableMerge: true } })
- Renamed
- Renamed
unmergeTableCells
tosplitTableCell
. - Renamed
editor.api.create.cell
toeditor.api.create.tableCell
. - In
useTableMergeState
, renamedcanUnmerge
tocanSplit
. insertTableRow
andinsertTableColumn
: removeddisableSelect
in favor ofselect
. Migration: replace it with the opposite boolean.getTableCellBorders
: params(element, options)
→(editor, options)
; removedisFirstCell
andisFirstRow
.- Merged
useTableCellElementState
intouseTableCellElement
:- Removed its parameter.
- Removed
hovered
andhoveredLeft
returns (use CSS instead). - Renamed
rowSize
tominHeight
. - Computes column sizes and returns
width
.
- Merged
useTableCellElementResizableState
intouseTableCellElementResizable
:- Removed
onHover
andonHoverEnd
props (use CSS instead).
- Removed
- Merged
useTableElementState
intouseTableElement
:- Removed its parameter.
- No longer computes and returns
colSizes
,minColumnWidth
, andcolGroupProps
.
Minor Changes
-
TablePlugin
new api and transforms:
type TableApi = { create: { table: OmitFirst<typeof getEmptyTableNode>; /** Cell node factory used each time a cell is created. */ tableCell: OmitFirst<typeof getEmptyCellNode>; tableRow: OmitFirst<typeof getEmptyRowNode>; }; table: { getCellBorders: OmitFirst<typeof getTableCellBorders>; getCellSize: OmitFirst<typeof getTableCellSize>; getColSpan: typeof getColSpan; getRowSpan: typeof getRowSpan; }; }; type TableTransforms = { insert: { table: OmitFirst<typeof insertTable>; }; remove: { table: OmitFirst<typeof deleteTable>; tableColumn: OmitFirst<typeof deleteColumn>; tableRow: OmitFirst<typeof deleteRow>; }; table: { merge: OmitFirst<typeof mergeTableCells>; split: OmitFirst<typeof splitTableCell>; }; };
insertTableColumn
addbefore
option to insert a column before the current column.insertTableRow
addbefore
option to insert a row before the current row.insertTable
now supports inserting a table after the current table.