Class: TableNode

A Lexical node that represents a markdown table. Use "$createTableNode" to construct one.

Extends

  • DecoratorNode<JSX.Element>

Constructors

new TableNode()

new TableNode(mdastNode?, key?): TableNode

Constructs a new TableNode with the specified MDAST table node as the object to edit. See micromark/micromark-extension-gfm-table for more information on the MDAST table node.

Parameters

ParameterType
mdastNode?Table
key?string

Returns

TableNode

Overrides

DecoratorNode<JSX.Element>.constructor

Methods

addColumnToRight()

addColumnToRight(): void

Returns

void


addRowToBottom()

addRowToBottom(): void

Returns

void


deleteColumnAt()

deleteColumnAt(colIndex): void

Parameters

ParameterType
colIndexnumber

Returns

void


deleteRowAt()

deleteRowAt(rowIndex): void

Parameters

ParameterType
rowIndexnumber

Returns

void


getColCount()

getColCount(): number

Returns the number of columns in the table.

Returns

number


getMdastNode()

getMdastNode(): Table

Returns the mdast node that this node is constructed from.

Returns

Table


getRowCount()

getRowCount(): number

Returns the number of rows in the table.

Returns

number


insertColumnAt()

insertColumnAt(colIndex): void

Parameters

ParameterType
colIndexnumber

Returns

void


insertRowAt()

insertRowAt(y): void

Parameters

ParameterType
ynumber

Returns

void


select()

select(coords?): void

Focuses the table cell at the specified coordinates. Pass undefined to remove the focus.

Parameters

ParameterType
coords?[number, number]

Returns

void


setColumnAlign()

setColumnAlign(colIndex, align): void

Parameters

ParameterType
colIndexnumber
alignAlignType

Returns

void