Skip to main content
A newer version of this page is available. .

SplitTableCellsCommand.execute(rowCount, columnCount, mergeBeforeSplit) Method

Executes the SplitTableCellsCommand command by applying the specified settings.

May result in taking no action if the command’s state does not allow command execution. Use the object’s getState method to check the command state.

Declaration

execute(
    rowCount: number,
    columnCount: number,
    mergeBeforeSplit: boolean
): boolean

Parameters

Name Type Description
rowCount number

An integer value specifying a number of rows in the split table cells.

columnCount number

An integer value specifying a number of columns in the split table cells.

mergeBeforeSplit boolean

true to merge the selected cells before the splitting; otherwise, false.

Returns

Type Description
boolean

A Boolean value identifying whether method execution was successful or failed.

Remarks

The execute method checks the command state (obtained using the getState method) before executing, and decides whether the action can be performed.

Usage example:


richEdit.commands.splitTableCells.execute(5, 3, true);

The command split table cells only if the selection contains only a target range forming a rectangle without any unselected table cells.

If the selected range includes more than one table row, the command ignores the value of the rowCount parameter and split the selected table cells only into columns.

See Also