Skip to content

Type Editor


Type Editor / @type-editor/tables / commands/selected-rect / selectedRect

Function: selectedRect()

ts
function selectedRect(state): TableRect;

Defined in: tables/src/commands/selected-rect.ts:21

Gets the selected rectangular region in a table.

This helper function determines the selection bounds and adds table map, table node, and table start offset to the result for convenience.

Parameters

ParameterTypeDescription
statePmEditorStateThe current editor state

Returns

TableRect

A TableRect containing the selection bounds and table context

Throws

Error if not within a table (use isInTable() first)