Create structured data with full Word table compatibility.
Professional tables with merge/split capabilities, preserving all formatting through Word import/export.
OOXML Structure
< w:tbl >
< w:tblPr >
< w:tblBorders >
< w:top w:val = "single" w:sz = "4" />
< w:left w:val = "single" w:sz = "4" />
< w:bottom w:val = "single" w:sz = "4" />
< w:right w:val = "single" w:sz = "4" />
< w:insideH w:val = "single" w:sz = "4" />
< w:insideV w:val = "single" w:sz = "4" />
</ w:tblBorders >
</ w:tblPr >
< w:tr >
< w:tc >
< w:tcPr >
< w:tcW w:w = "2880" w:type = "dxa" />
</ w:tcPr >
< w:p >< w:r >< w:t > Cell content </ w:t ></ w:r ></ w:p >
</ w:tc >
</ w:tr >
</ w:tbl >
Use Case
Financial reports - Quarterly data with totals
Comparison matrices - Feature/pricing tables
Schedules - Time-based planning with merged headers
Data organization - Structured content that needs alignment
Complex layouts - Merged cells for sophisticated designs
Options
Configure the extension behavior:
htmlAttributes
Object
default: "{'aria-label':'Table node'}"
Default HTML attributes for all tables
Enable column resizing functionality
Width of resize handles in pixels
Minimum cell width constraint in pixels
Allow resizing of the last column
Enable selecting the entire table node
Attributes
Node attributes that can be set and retrieved:
Table indentation configuration
Border styling for this table
CSS border-collapse property
Table alignment (‘left’, ‘center’, ‘right’)
Cell spacing in pixels for this table
Commands
insertTable
Insert a new table into the document
Example:
editor . commands . insertTable ()
editor . commands . insertTable ({ rows: 3 , cols: 3 , withHeaderRow: true })
Parameters:
Table configuration options
deleteTable
Delete the entire table containing the cursor
Example:
editor . commands . deleteTable ()
addColumnBefore
Add a column before the current column
Preserves cell attributes from current column
Example:
editor . commands . addColumnBefore ()
addColumnAfter
Add a column after the current column
Preserves cell attributes from current column
Example:
editor . commands . addColumnAfter ()
Returns: Function
Command
deleteColumn
Delete the column containing the cursor
Example:
editor . commands . deleteColumn ()
Returns: Function
Command
addRowBefore
Add a row before the current row
Preserves cell attributes from current row
Example:
editor . commands . addRowBefore ()
Returns: Function
Command
addRowAfter
Add a row after the current row
Preserves cell attributes from current row
Example:
editor . commands . addRowAfter ()
Returns: Function
Command
deleteRow
Delete the row containing the cursor
Example:
editor . commands . deleteRow ()
Returns: Function
Command
mergeCells
Merge selected cells into one
Content from all cells is preserved
Example:
editor . commands . mergeCells ()
Returns: Function
Command
splitCell
Split a merged cell back into individual cells
Example:
editor . commands . splitCell ()
Returns: Function
Command - true if split, false if position invalid
splitSingleCell
Split a single unmerged cell into two cells horizontally
Different from splitCell which splits merged cells back to original cells
Example:
editor . commands . splitSingleCell ()
Returns: Function
Command - true if split, false if position invalid
mergeOrSplit
Toggle between merge and split cells based on selection
Merges if multiple cells selected, splits if merged cell selected
Example:
editor . commands . mergeOrSplit ()
Returns: Function
Command
toggleHeaderColumn
Toggle the first column as header column
Example:
editor . commands . toggleHeaderColumn ()
Returns: Function
Command
Toggle the first row as header row
Example:
editor . commands . toggleHeaderRow ()
Returns: Function
Command
Toggle current cell as header cell
Example:
editor . commands . toggleHeaderCell ()
Returns: Function
Command
setCellAttr
Set an attribute on selected cells
Example:
editor . commands . setCellAttr ( 'background' , { color: 'ff0000' })
setCellAttr ( 'verticalAlign' , 'middle' )
Parameters:
Returns: Function
Command
goToNextCell
Navigate to the next cell (Tab behavior)
Example:
editor . commands . goToNextCell ()
Returns: Function
Command
goToPreviousCell
Navigate to the previous cell (Shift+Tab behavior)
Example:
editor . commands . goToPreviousCell ()
Returns: Function
Command
fixTables
Fix table structure inconsistencies
Repairs malformed tables and normalizes structure
Example:
editor . commands . fixTables ()
Returns: Function
Command
setCellSelection
Set cell selection programmatically
Example:
editor . commands . setCellSelection ({ anchorCell: 10 , headCell: 15 })
Parameters:
pos
CellSelectionPosition
required
Cell selection coordinates
Returns: Function
Command
setCellBackground
Set background color for selected cells
Example:
editor . commands . setCellBackground ( '#ff0000' )
editor . commands . setCellBackground ( 'ff0000' )
Parameters:
Color value (hex with or without #)
deleteCellAndTableBorders
Remove all borders from table and its cells
Sets all border sizes to 0
Example:
editor . commands . deleteCellAndTableBorders ()
Returns: Function
Command
Keyboard Shortcuts
Command Shortcut Description goToNextCell/addRowAfter() Tab
Navigate to next cell or add row goToPreviousCell() Shift-Tab
Navigate to previous cell deleteTableWhenSelected() Backspace
Delete table when all cells selected deleteTableWhenSelected() Delete
Delete table when all cells selected
Types
ThemeColor
Theme color options
ShadingPattern
Shading pattern options
ShadingProperties
Shading properties
Shading color (hex without # or “auto” for automatic)
Shading fill color (hex without # or “auto” for automatic)
Theme fill shade (0-255 in hex format without #)
Theme fill tint (0-255 in hex format without #)
Theme shade (0-255 in hex format without #)
Theme tint (0-255 in hex format without #)
TableMeasurement
Table width options
Table width type (dxa=twips, pct=percentage, auto=automatic)
TableLook
Table look options
Specifies that the first column conditional formatting should be applied
Specifies that the first row conditional formatting should be applied
Specifies that the last column conditional formatting should be applied
Specifies that the last row conditional formatting should be applied
Specifies that no horizontal banding conditional formatting should be applied
Specifies that no vertical banding conditional formatting should be applied
FloatingTableProperties
Floating table properties
Specifies the minimum distance in twips which shall be maintained between the current floating table and the edge of text in the paragraph which is to the left of this floating table.
Specifies the minimum distance in twips which shall be maintained between the current floating table and the edge of text in the paragraph which is to the right of this floating table.
Specifies the minimum distance in twips which shall be maintained between the current floating table and the bottom edge of text in the paragraph which is above this floating table.
Specifies the minimum distance in twips which shall be maintained between the current floating table and the top edge of text in the paragraph which is below this floating table.
Specifies and absolute horizontal position for the floating table. The position is measured from the horizontal anchor point (horzAnchor) in twips.
Specifies and absolute vertical position for the floating table. The position is measured from the vertical anchor point (vertAnchor) in twips.
Horizontal anchor point for tblpX
Vertical anchor point for tblpY
tblpXSpec
any | any | any | any | any
Specifies a relative horizontal position for the floating table. Supercedes tblpX if both are specified.
tblpYSpec
any | any | any | any | any | any
Specifies a relative vertical position for the floating table. Supercedes tblpY if both are specified.
TableBorderSpec
Table border specification
Border style (e.g., ‘single’, ‘double’, ‘dashed’, etc.)
Border color (hex without #, e.g., ‘FF0000’ for red)
Theme tint (0-255 in hex format without #)
Theme shade (0-255 in hex format without #)
Border size in eighths of a point (e.g., 8 = 1pt, 16 = 2pt)
Space in points between border and text
Whether the border has a shadow
Whether the border is a frame
TableBorders
Table borders properties
Bottom border specification
End (right in LTR, left in RTL) border specification
Inside horizontal border specification
Inside vertical border specification
Left border specification
Right border specification
Start (left in LTR, right in RTL) border specification
TableBorders
Table borders object
Right border configuration
Bottom border configuration
Left border configuration
Inside horizontal borders
TableCellMargins
Table cell margin properties
Start cell margin (left in LTR, right in RTL)
End cell margin (right in LTR, left in RTL)
TableProperties
Table properties
Specifies that the cells with this table shall be visually represented in a right to left direction
justification
any | any | any | any | any
The alignment of the set of rows which are part of the current table.
Shading properties for the table
Caption text for the table
Description text for the table
Various boolean flags that affect the rendering of the table
Specifies whether the current table should allow other floating tables to overlap its extents when the tables are displayed in a document
Reference to table style ID
Number of columns for which the table style is applied
Number of rows for which the table style is applied
Floating table properties
Table border configuration
ColWidth
Column width definition
TableGrid
Table grid definition
Array of column widths in twips
TableConfig
Table configuration options
Number of columns to create
Create first row as header row
TableIndent
Table indentation configuration
CellSelectionPosition
Cell selection position
CurrentCellInfo
Current cell information
Selected rectangle information
CellBorder
Cell border configuration
CellBorders
Cell borders object
TableBorder
Table border configuration
Border color (hex or CSS color)
Border style (solid, dashed, dotted)
BorderOptions
Border creation options
Source Code