Skip to content

Type Editor


Type Editor / @type-editor/tables / cellselection/normalize-selection

cellselection/normalize-selection

Functions

FunctionDescription

normalizeSelection

Normalizes table-related selections to ensure consistent behavior.

This function handles several edge cases:

  • Converts node selections on cells to CellSelection
  • Converts node selections on rows to full row CellSelection
  • Converts node selections on tables to select all cells (if not allowed)
  • Normalizes selections at cell boundaries to collapsed selections
  • Normalizes text selections spanning multiple cells to stay within the first cell