Skip to content

Type Editor


Type Editor / @type-editor/tables / utils/move-cell-forward

utils/move-cell-forward

Functions

FunctionDescription

moveCellForward

Moves a position forward past the current cell.

This function assumes the position points at a cell (see pointsAtCell) and returns a new resolved position after that cell.

Example

typescript
let $cellPos = getFirstCellPos(table);
while (pointsAtCell($cellPos)) {
  processCell($cellPos.nodeAfter);
  $cellPos = moveCellForward($cellPos);
}