Skip to content

Type Editor


Type Editor / @type-editor/tables / commands/split-cell-with-type / splitCellWithType

Function: splitCellWithType()

ts
function splitCellWithType(getCellType): Command;

Defined in: tables/src/commands/split-cell-with-type.ts:23

Splits a selected cell into smaller cells with custom cell type determination.

This function allows specifying the cell type (th or td) for each new cell via a callback function.

Parameters

ParameterTypeDescription
getCellType(options) => NodeTypeA function that returns the NodeType for each new cell

Returns

Command

A command that performs the split operation