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
Parameter | Type |
---|---|
mdastNode ? | Table |
key ? | string |
Returns
Overrides
DecoratorNode<JSX.Element>.constructor
Methods
addColumnToRight()
addColumnToRight():
void
Returns
void
addRowToBottom()
addRowToBottom():
void
Returns
void
deleteColumnAt()
deleteColumnAt(
colIndex
):void
Parameters
Parameter | Type |
---|---|
colIndex | number |
Returns
void
deleteRowAt()
deleteRowAt(
rowIndex
):void
Parameters
Parameter | Type |
---|---|
rowIndex | number |
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
Parameter | Type |
---|---|
colIndex | number |
Returns
void
insertRowAt()
insertRowAt(
y
):void
Parameters
Parameter | Type |
---|---|
y | number |
Returns
void
select()
select(
coords
?):void
Focuses the table cell at the specified coordinates.
Pass undefined
to remove the focus.
Parameters
Parameter | Type |
---|---|
coords ? | [number , number ] |
Returns
void
setColumnAlign()
setColumnAlign(
colIndex
,align
):void
Parameters
Parameter | Type |
---|---|
colIndex | number |
align | AlignType |
Returns
void