Module: @lexical/table
Classes
Type Aliases
HTMLTableElementWithWithTableSelectionState
Ƭ HTMLTableElementWithWithTableSelectionState: HTMLTableElement
& { __lexicalTableSelection?
: TableObserver
}
Defined in
packages/lexical-table/src/LexicalTableSelectionHelpers.ts:944
InsertTableCommandPayload
Ƭ InsertTableCommandPayload: Readonly
<{ columns
: string
; includeHeaders?
: InsertTableCommandPayloadHeaders
; rows
: string
}>
Defined in
packages/lexical-table/src/LexicalTableCommands.ts:20
InsertTableCommandPayloadHeaders
Ƭ InsertTableCommandPayloadHeaders: Readonly
<{ columns
: boolean
; rows
: boolean
}> | boolean
Defined in
packages/lexical-table/src/LexicalTableCommands.ts:13
SerializedTableCellNode
Ƭ SerializedTableCellNode: Spread
<{ backgroundColor?
: null
| string
; colSpan?
: number
; headerState
: TableCellHeaderState
; rowSpan?
: number
; width?
: number
}, SerializedElementNode
>
Defined in
packages/lexical-table/src/LexicalTableCellNode.ts:43
SerializedTableNode
Ƭ SerializedTableNode: Spread
<{ colWidths?
: readonly number
[] ; rowStriping?
: boolean
}, SerializedElementNode
>
Defined in
packages/lexical-table/src/LexicalTableNode.ts:41
SerializedTableRowNode
Ƭ SerializedTableRowNode: Spread
<{ height?
: number
}, SerializedElementNode
>
Defined in
packages/lexical-table/src/LexicalTableRowNode.ts:25
TableDOMCell
Ƭ TableDOMCell: Object
Type declaration
Name | Type |
---|---|
elem | HTMLElement |
hasBackgroundColor | boolean |
highlighted | boolean |
x | number |
y | number |
Defined in
packages/lexical-table/src/LexicalTableObserver.ts:44
TableMapType
Ƭ TableMapType: TableMapValueType
[][]
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:43
TableMapValueType
Ƭ TableMapValueType: Object
Type declaration
Name | Type |
---|---|
cell | TableCellNode |
startColumn | number |
startRow | number |
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:38
TableSelectionShape
Ƭ TableSelectionShape: Object
Type declaration
Name | Type |
---|---|
fromX | number |
fromY | number |
toX | number |
toY | number |
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:31
Variables
INSERT_TABLE_COMMAND
• Const
INSERT_TABLE_COMMAND: LexicalCommand
<InsertTableCommandPayload
>
Defined in
packages/lexical-table/src/LexicalTableCommands.ts:26
TableCellHeaderStates
• Const
TableCellHeaderStates: Object
Type declaration
Name | Type |
---|---|
BOTH | number |
COLUMN | number |
NO_STATUS | number |
ROW | number |
Defined in
packages/lexical-table/src/LexicalTableCellNode.ts:33
Functions
$computeTableMap
▸ $computeTableMap(grid
, cellA
, cellB
): [TableMapType
, TableMapValueType
, TableMapValueType
]
Parameters
Name | Type |
---|---|
grid | TableNode |
cellA | TableCellNode |
cellB | TableCellNode |
Returns
[TableMapType
, TableMapValueType
, TableMapValueType
]
Defined in
packages/lexical-table/src/LexicalTableUtils.ts:771
$computeTableMapSkipCellCheck
▸ $computeTableMapSkipCellCheck(grid
, cellA
, cellB
): [TableMapType
, TableMapValueType
| null
, TableMapValueType
| null
]
Parameters
Name | Type |
---|---|
grid | TableNode |
cellA | null | TableCellNode |
cellB | null | TableCellNode |
Returns
[TableMapType
, TableMapValueType
| null
, TableMapValueType
| null
]
Defined in
packages/lexical-table/src/LexicalTableUtils.ts:786
$createScrollableNode
▸ $createScrollableNode(): ScrollableNode
Returns
Defined in
packages/lexical-table/src/LexicalScrollableNode.ts:114
$createTableCellNode
▸ $createTableCellNode(headerState
, colSpan?
, width?
): TableCellNode
Parameters
Name | Type | Default value |
---|---|---|
headerState | number | undefined |
colSpan | number | 1 |
width? | number | undefined |
Returns
Defined in
packages/lexical-table/src/LexicalTableCellNode.ts:371
$createTableNode
▸ $createTableNode(): TableNode
Returns
Defined in
packages/lexical-table/src/LexicalTableNode.ts:379
$createTableNodeWithDimensions
▸ $createTableNodeWithDimensions(rowCount
, columnCount
, includeHeaders?
): TableNode
Parameters
Name | Type | Default value |
---|---|---|
rowCount | number | undefined |
columnCount | number | undefined |
includeHeaders | InsertTableCommandPayloadHeaders | true |
Returns
Defined in
packages/lexical-table/src/LexicalTableUtils.ts:39
$createTableRowNode
▸ $createTableRowNode(height?
): TableRowNode
Parameters
Name | Type |
---|---|
height? | number |
Returns
Defined in
packages/lexical-table/src/LexicalTableRowNode.ts:122
$createTableSelection
▸ $createTableSelection(): TableSelection
Returns
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:383
$deleteTableColumn
▸ $deleteTableColumn(tableNode
, targetIndex
): TableNode
Parameters
Name | Type |
---|---|
tableNode | TableNode |
targetIndex | number |
Returns
Defined in
packages/lexical-table/src/LexicalTableUtils.ts:484