Class: TableSelection
@lexical/table.TableSelection
Implements
Constructors
constructor
• new TableSelection(tableKey
, anchor
, focus
): TableSelection
Parameters
Name | Type |
---|---|
tableKey | string |
anchor | PointType |
focus | PointType |
Returns
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:52
Properties
_cachedNodes
• _cachedNodes: null
| LexicalNode
[]
Implementation of
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:49
anchor
• anchor: PointType
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:47
dirty
• dirty: boolean
Implementation of
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:50
focus
• focus: PointType
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:48
tableKey
• tableKey: string
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:46
Methods
clone
▸ clone(): TableSelection
Returns
Implementation of
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:102
extract
▸ extract(): LexicalNode
[]
Returns
Implementation of
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:110
getCachedNodes
▸ getCachedNodes(): null
| LexicalNode
[]
Returns
null
| LexicalNode
[]
Implementation of
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:75
getNodes
▸ getNodes(): LexicalNode
[]
Returns
Implementation of
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:206
getShape
▸ getShape(): TableSelectionShape
Returns
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:157
getStartEndPoints
▸ getStartEndPoints(): [PointType
, PointType
]
Returns
Implementation of
BaseSelection.getStartEndPoints
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:62
getTextContent
▸ getTextContent(): string
Returns
string
Implementation of
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:366
hasFormat
▸ hasFormat(type
): boolean
Returns whether the provided TextFormatType is present on the Selection. This will be true if any paragraph in table cells has the specified format.
Parameters
Name | Type | Description |
---|---|---|
type | TextFormatType | the TextFormatType to check for. |
Returns
boolean
true if the provided format is currently toggled on on the Selection, false otherwise.
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:129
insertNodes
▸ insertNodes(nodes
): void
Parameters
Name | Type |
---|---|
nodes | LexicalNode [] |
Returns
void
Implementation of
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:144
insertRawText
▸ insertRawText(text
): void
Parameters
Name | Type |
---|---|
text | string |
Returns
void
Implementation of
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:114
insertText
▸ insertText(): void
Returns
void
Implementation of
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:118
is
▸ is(selection
): boolean
Parameters
Name | Type |
---|---|
selection | null | BaseSelection |
Returns
boolean
Implementation of
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:83
isBackward
▸ isBackward(): boolean
Returns whether the Selection is "backwards", meaning the focus logically precedes the anchor in the EditorState.
Returns
boolean
true if the Selection is backwards, false otherwise.
Implementation of
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:71
isCollapsed
▸ isCollapsed(): boolean
Returns
boolean
Implementation of
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:106
set
▸ set(tableKey
, anchorCellKey
, focusCellKey
): void
Parameters
Name | Type |
---|---|
tableKey | string |
anchorCellKey | string |
focusCellKey | string |
Returns
void
Defined in
packages/lexical-table/src/LexicalTableSelection.ts:94
setCachedNodes
▸ setCachedNodes(nodes
): void
Parameters
Name | Type |
---|---|
nodes | null | LexicalNode [] |
Returns
void