Installation
Usage
Configuration
HTMLAttributes
Custom HTML attributes to add to the table element.Custom HTML attributes that should be added to the rendered HTML tag.
resizable
Enables column resizing for tables.When enabled, users can resize table columns by dragging column borders.
renderWrapper
Controls whether the table should be wrapped in a div.Wraps the table in a div with class “tableWrapper” when rendered.
handleWidth
The width of the resize handle.Width in pixels of the column resize handle.
cellMinWidth
The minimum width of a cell.Minimum width in pixels that a table cell can be resized to.
lastColumnResizable
Enables resizing of the last column.When false, the last column cannot be resized.
allowTableNodeSelection
Allow table node selection.When enabled, users can select the entire table as a node.
Commands
insertTable
Inserts a new table with the specified dimensions.addColumnBefore
Adds a column before the current column.addColumnAfter
Adds a column after the current column.deleteColumn
Deletes the current column.addRowBefore
Adds a row before the current row.addRowAfter
Adds a row after the current row.deleteRow
Deletes the current row.deleteTable
Deletes the entire table.mergeCells
Merges the currently selected cells.splitCell
Splits the currently selected cell.toggleHeaderColumn
Toggles the header status of the current column.toggleHeaderRow
Toggles the header status of the current row.toggleHeaderCell
Toggles the header status of the current cell.mergeOrSplit
Merges selected cells or splits the current cell.setCellAttribute
Sets an attribute on the current cell.goToNextCell
Moves the selection to the next cell.goToPreviousCell
Moves the selection to the previous cell.fixTables
Attempts to fix the table structure if necessary.setCellSelection
Sets a cell selection inside the current table.Keyboard Shortcuts
- Tab: Move to the next cell (creates a new row if at the end)
- Shift-Tab: Move to the previous cell
- Backspace: Delete table when all cells are selected
- Mod-Backspace: Delete table when all cells are selected
- Delete: Delete table when all cells are selected
- Mod-Delete: Delete table when all cells are selected
Examples
Basic Table
Resizable Table
Manipulating Tables
Related Extensions
The Table extension requires these companion extensions:- TableRow - Defines table rows (tr elements)
- TableCell - Defines regular table cells (td elements)
- TableHeader - Defines header cells (th elements)