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:
Name | Type | Description |
---|---|---|
actionName | String | 'insertTable' table inserting API |
rowcol | Object | { row: {Number} col: {Number} } row/column of table |
Example:
editor.execCommand('insertTable', { row: 2, col: 2 }); // insert 2x2 table