Skip to main content

Class: TableCellNode

@lexical/table.TableCellNode

Hierarchy

Constructors

constructor

new TableCellNode(headerState?, colSpan?, width?, key?)

Parameters

NameTypeDefault value
headerStatenumberTableCellHeaderStates.NO_STATUS
colSpannumber1
width?numberundefined
key?stringundefined

Overrides

DEPRECATED_GridCellNode.constructor

Defined in

lexical-table/src/LexicalTableCellNode.ts:98

Methods

canBeEmpty

canBeEmpty(): false

Returns

false

Overrides

DEPRECATED_GridCellNode.canBeEmpty

Defined in

lexical-table/src/LexicalTableCellNode.ts:250


canIndent

canIndent(): false

Returns

false

Overrides

DEPRECATED_GridCellNode.canIndent

Defined in

lexical-table/src/LexicalTableCellNode.ts:254


collapseAtStart

collapseAtStart(): true

Returns

true

Overrides

DEPRECATED_GridCellNode.collapseAtStart

Defined in

lexical-table/src/LexicalTableCellNode.ts:246


createDOM

createDOM(config): HTMLElement

Parameters

NameType
configEditorConfig

Returns

HTMLElement

Overrides

DEPRECATED_GridCellNode.createDOM

Defined in

lexical-table/src/LexicalTableCellNode.ts:109


exportDOM

exportDOM(editor): DOMExportOutput

Parameters

NameType
editorLexicalEditor

Returns

DOMExportOutput

Overrides

DEPRECATED_GridCellNode.exportDOM

Defined in

lexical-table/src/LexicalTableCellNode.ts:136


exportJSON

exportJSON(): SerializedTableCellNode

Controls how the this node is serialized to JSON. This is important for copy and paste between Lexical editors sharing the same namespace. It's also important if you're serializing to JSON for persistent storage somewhere. See Serialization & Deserialization.

Returns

SerializedTableCellNode

Overrides

DEPRECATED_GridCellNode.exportJSON

Defined in

lexical-table/src/LexicalTableCellNode.ts:170


getBackgroundColor

getBackgroundColor(): null | string

Returns

null | string

Defined in

lexical-table/src/LexicalTableCellNode.ts:204


getHeaderStyles

getHeaderStyles(): number

Returns

number

Defined in

lexical-table/src/LexicalTableCellNode.ts:190


getTag

getTag(): string

Returns

string

Defined in

lexical-table/src/LexicalTableCellNode.ts:180


getWidth

getWidth(): undefined | number

Returns

undefined | number

Defined in

lexical-table/src/LexicalTableCellNode.ts:200


hasHeader

hasHeader(): boolean

Returns

boolean

Defined in

lexical-table/src/LexicalTableCellNode.ts:228


hasHeaderState

hasHeaderState(headerState): boolean

Parameters

NameType
headerStatenumber

Returns

boolean

Defined in

lexical-table/src/LexicalTableCellNode.ts:224


isShadowRoot

isShadowRoot(): boolean

Returns

boolean

Overrides

DEPRECATED_GridCellNode.isShadowRoot

Defined in

lexical-table/src/LexicalTableCellNode.ts:242


setBackgroundColor

setBackgroundColor(newBackgroundColor): void

Parameters

NameType
newBackgroundColornull | string

Returns

void

Defined in

lexical-table/src/LexicalTableCellNode.ts:208


setHeaderStyles

setHeaderStyles(headerState): number

Parameters

NameType
headerStatenumber

Returns

number

Defined in

lexical-table/src/LexicalTableCellNode.ts:184


setWidth

setWidth(width): undefined | null | number

Parameters

NameType
widthnumber

Returns

undefined | null | number

Defined in

lexical-table/src/LexicalTableCellNode.ts:194


toggleHeaderStyle

toggleHeaderStyle(headerStateToToggle): TableCellNode

Parameters

NameType
headerStateToTogglenumber

Returns

TableCellNode

Defined in

lexical-table/src/LexicalTableCellNode.ts:212


updateDOM

updateDOM(prevNode): boolean

Parameters

NameType
prevNodeTableCellNode

Returns

boolean

Overrides

DEPRECATED_GridCellNode.updateDOM

Defined in

lexical-table/src/LexicalTableCellNode.ts:232


clone

Static clone(node): TableCellNode

Parameters

NameType
nodeTableCellNode

Returns

TableCellNode

Overrides

DEPRECATED_GridCellNode.clone

Defined in

lexical-table/src/LexicalTableCellNode.ts:62


getType

Static getType(): string

Returns

string

Overrides

DEPRECATED_GridCellNode.getType

Defined in

lexical-table/src/LexicalTableCellNode.ts:58


importDOM

Static importDOM(): null | DOMConversionMap<HTMLElement>

Returns

null | DOMConversionMap<HTMLElement>

Defined in

lexical-table/src/LexicalTableCellNode.ts:74


importJSON

Static importJSON(serializedNode): TableCellNode

Parameters

NameType
serializedNodeSerializedTableCellNode

Returns

TableCellNode

Overrides

DEPRECATED_GridCellNode.importJSON

Defined in

lexical-table/src/LexicalTableCellNode.ts:87