Page tree
Skip to end of metadata
Go to start of metadata

Insert table at the caret position.

When the caret is positioned within a paragraph, the paragraph is divided and the table is inserted.

When there is a selection, the selected block is deleted and the table is inserted.


Parameters:

NameTypeDescription
actionNameString'insertTable' table inserting API
rowcolObject

{ row: {Number} col: {Number} }

row/column of table


Example:

editor.execCommand('insertTable', { row: 2, col: 2 }); // insert 2x2 table
  • No labels