Skip to content

Type Editor


Type Editor / @type-editor/tables / utils/is-in-table

utils/is-in-table

Functions

FunctionDescription

isInTable

Checks whether the current selection is inside a table.

This function examines the selection's head position and traverses up the document tree to determine if any ancestor is a table row.

Example

typescript
if (isInTable(state)) {
  // Enable table-specific commands
}