Skip to main content

Class: TableObserver

@lexical/table.TableObserver

Constructors

constructor

new TableObserver(editor, tableNodeKey): TableObserver

Parameters

NameType
editorLexicalEditor
tableNodeKeystring

Returns

TableObserver

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:109

Properties

abortController

abortController: AbortController

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:105


anchorCell

anchorCell: null | TableDOMCell

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:96


anchorCellNodeKey

anchorCellNodeKey: null | string

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:98


anchorX

anchorX: number

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:93


anchorY

anchorY: number

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:94


editor

editor: LexicalEditor

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:100


focusCell

focusCell: null | TableDOMCell

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:97


focusCellNodeKey

focusCellNodeKey: null | string

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:99


focusX

focusX: number

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:88


focusY

focusY: number

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:89


hasHijackedSelectionStyles

hasHijackedSelectionStyles: boolean

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:102


isHighlightingCells

isHighlightingCells: boolean

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:92


isSelecting

isSelecting: boolean

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:103


listenerOptions

listenerOptions: Object

Type declaration

NameType
signalAbortSignal

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:106


listenersToRemove

listenersToRemove: Set<() => void>

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:90


nextFocus

nextFocus: null | { focusCell: TableDOMCell ; override: boolean }

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:107


shouldCheckSelection

shouldCheckSelection: boolean

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:104


table

table: TableDOMTable

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:91


tableNodeKey

tableNodeKey: string

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:95


tableSelection

tableSelection: null | TableSelection

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:101

Methods

$clearHighlight

$clearHighlight(): void

Returns

void

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:202


$clearText

$clearText(): void

Returns

void

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:454


$disableHighlightStyle

$disableHighlightStyle(): void

Returns

void

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:239


$enableHighlightStyle

$enableHighlightStyle(): void

Returns

void

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:227


$formatCells

$formatCells(type): void

Parameters

NameType
typeTextFormatType

Returns

void

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:426


$getAnchorTableCell

$getAnchorTableCell(): null | TableCellNode

Returns

null | TableCellNode

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:380


$getAnchorTableCellOrThrow

$getAnchorTableCellOrThrow(): TableCellNode

Returns

TableCellNode

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:385


$getFocusTableCell

$getFocusTableCell(): null | TableCellNode

Returns

null | TableCellNode

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:394


$getFocusTableCellOrThrow

$getFocusTableCellOrThrow(): TableCellNode

Returns

TableCellNode

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:398


$lookup

$lookup(): Object

Returns

Object

NameType
tableElementHTMLTableElementWithWithTableSelectionState
tableNodeTableNode

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:149


$setAnchorCellForSelection

$setAnchorCellForSelection(cell): void

Parameters

NameType
cellTableDOMCell

Returns

void

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:404


$setFocusCellForSelection

$setFocusCellForSelection(cell, ignoreStart?): boolean

Parameters

NameTypeDefault value
cellTableDOMCellundefined
ignoreStartbooleanfalse

Returns

boolean

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:330


$updateTableTableSelection

$updateTableTableSelection(selection): void

Parameters

NameType
selectionnull | TableSelection

Returns

void

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:248


getTable

getTable(): TableDOMTable

Returns

TableDOMTable

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:137


removeListeners

removeListeners(): void

Returns

void

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:141


trackTable

trackTable(): void

Returns

void

Defined in

packages/lexical-table/src/LexicalTableObserver.ts:156