mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-17 20:47:49 +08:00
3.8 KiB
3.8 KiB
Table
⚠️ Work in progress
Installation
::: warning Use with TableRow, TableHeader and TableCell
This extension requires the TableRow
, TableHeader
and TableCell
nodes.
:::
# with npm
npm install @tiptap/extension-table @tiptap/extension-table-row @tiptap/extension-table-header @tiptap/extension-table-cell
# with Yarn
yarn add @tiptap/extension-table @tiptap/extension-table-row @tiptap/extension-table-header @tiptap/extension-table-cell
Settings
Option | Type | Default | Description |
---|---|---|---|
HTMLAttributes | Object |
{} |
Custom HTML attributes that should be added to the rendered HTML tag. |
resizable | Boolean |
false |
|
handleWidth | Number |
5 |
|
cellMinWidth | Number |
25 |
|
View | View |
TableView |
|
lastColumnResizable | Boolean |
true |
|
allowTableNodeSelection | Boolean |
false |
Commands
Command | Parameters | Description |
---|---|---|
insertTable | { rows = 3, cols = 3, withHeaderRow = true } |
|
addColumnBefore | – | |
addColumnAfter | – | |
deleteColumn | – | |
addRowBefore | – | |
addRowAfter | – | |
deleteRow | – | |
deleteTable | – | |
mergeCells | – | |
splitCell | – | |
toggleHeaderColumn | – | |
toggleHeaderRow | – | |
toggleHeaderCell | – | |
mergeOrSplit | – | |
setCellAttribute | name , value |
|
goToNextCell | – | |
goToPreviousCell | – | |
fixTables | – |