Skip to content

Type Editor


Type Editor / @type-editor/tables / utils/find-cell

utils/find-cell

Functions

FunctionDescription

findCell

Finds the rectangular bounds of the cell at the given position.

Uses the table map to determine the cell's position in the table grid, accounting for any rowspan or colspan that may affect its bounds.

Example

typescript
const rect = findCell($cellPos);
console.log(`Cell spans from column ${rect.left} to ${rect.right}`);