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

GridCellNode.constructor

Defined in

lexical-table/src/LexicalTableCellNode.ts:89

Methods

canBeEmpty

canBeEmpty(): false

Returns

false

Overrides

GridCellNode.canBeEmpty

Defined in

lexical-table/src/LexicalTableCellNode.ts:205


canIndent

canIndent(): false

Returns

false

Overrides

GridCellNode.canIndent

Defined in

lexical-table/src/LexicalTableCellNode.ts:209


collapseAtStart

collapseAtStart(): true

Returns

true

Overrides

GridCellNode.collapseAtStart

Defined in

lexical-table/src/LexicalTableCellNode.ts:201


createDOM

createDOM(config): HTMLElement

Parameters

NameType
configEditorConfig

Returns

HTMLElement

Overrides

GridCellNode.createDOM

Defined in

lexical-table/src/LexicalTableCellNode.ts:100


exportDOM

exportDOM(editor): DOMExportOutput

Parameters

NameType
editorLexicalEditor

Returns

DOMExportOutput

Overrides

GridCellNode.exportDOM

Defined in

lexical-table/src/LexicalTableCellNode.ts:116


exportJSON

exportJSON(): SerializedTableCellNode

Returns

SerializedTableCellNode

Overrides

GridCellNode.exportJSON

Defined in

lexical-table/src/LexicalTableCellNode.ts:140


getHeaderStyles

getHeaderStyles(): number

Returns

number

Defined in

lexical-table/src/LexicalTableCellNode.ts:160


getTag

getTag(): string

Returns

string

Defined in

lexical-table/src/LexicalTableCellNode.ts:150


getWidth

getWidth(): undefined | number

Returns

undefined | number

Defined in

lexical-table/src/LexicalTableCellNode.ts:170


hasHeader

hasHeader(): boolean

Returns

boolean

Defined in

lexical-table/src/LexicalTableCellNode.ts:190


hasHeaderState

hasHeaderState(headerState): boolean

Parameters

NameType
headerStatenumber

Returns

boolean

Defined in

lexical-table/src/LexicalTableCellNode.ts:186


setHeaderStyles

setHeaderStyles(headerState): number

Parameters

NameType
headerStatenumber

Returns

number

Defined in

lexical-table/src/LexicalTableCellNode.ts:154


setWidth

setWidth(width): undefined | null | number

Parameters

NameType
widthnumber

Returns

undefined | null | number

Defined in

lexical-table/src/LexicalTableCellNode.ts:164


toggleHeaderStyle

toggleHeaderStyle(headerStateToToggle): TableCellNode

Parameters

NameType
headerStateToTogglenumber

Returns

TableCellNode

Defined in

lexical-table/src/LexicalTableCellNode.ts:174


updateDOM

updateDOM(prevNode): boolean

Parameters

NameType
prevNodeTableCellNode

Returns

boolean

Overrides

GridCellNode.updateDOM

Defined in

lexical-table/src/LexicalTableCellNode.ts:194


clone

Static clone(node): TableCellNode

Parameters

NameType
nodeTableCellNode

Returns

TableCellNode

Overrides

GridCellNode.clone

Defined in

lexical-table/src/LexicalTableCellNode.ts:59


getType

Static getType(): "tablecell"

Returns

"tablecell"

Overrides

GridCellNode.getType

Defined in

lexical-table/src/LexicalTableCellNode.ts:55


importDOM

Static importDOM(): null | DOMConversionMap<HTMLElement>

Returns

null | DOMConversionMap<HTMLElement>

Defined in

lexical-table/src/LexicalTableCellNode.ts:68


importJSON

Static importJSON(serializedNode): TableCellNode

Parameters

NameType
serializedNodeSerializedTableCellNode

Returns

TableCellNode

Overrides

GridCellNode.importJSON

Defined in

lexical-table/src/LexicalTableCellNode.ts:81