Class: GridSelection
@lexical/table.GridSelection
This class is being used only for internal use case of migration GridSelection outside of core package. DO NOT USE THIS CLASS DIRECTLY.
Hierarchy
↳
GridSelection
Constructors
constructor
• new GridSelection(gridKey
, anchor
, focus
)
Parameters
Name | Type |
---|---|
gridKey | string |
anchor | PointType |
focus | PointType |
Overrides
INTERNAL_PointSelection.constructor
Defined in
lexical-table/src/LexicalGridSelection.ts:40
Properties
_cachedNodes
• _cachedNodes: null
| LexicalNode
[]
Inherited from
INTERNAL_PointSelection._cachedNodes
Defined in
lexical/src/LexicalSelection.ts:284
anchor
• anchor: PointType
Inherited from
INTERNAL_PointSelection.anchor
Defined in
lexical/src/LexicalSelection.ts:281
dirty
• dirty: boolean
Inherited from
Defined in
lexical/src/LexicalSelection.ts:283
focus
• focus: PointType
Inherited from
Defined in
lexical/src/LexicalSelection.ts:282
gridKey
• gridKey: string
Defined in
lexical-table/src/LexicalGridSelection.ts:38
Methods
clone
▸ clone(): GridSelection
Returns
Overrides
Defined in
lexical-table/src/LexicalGridSelection.ts:72
extract
▸ extract(): LexicalNode
[]
Returns
Overrides
INTERNAL_PointSelection.extract
Defined in
lexical-table/src/LexicalGridSelection.ts:80
getCachedNodes
▸ getCachedNodes(): null
| LexicalNode
[]
Returns
null
| LexicalNode
[]
Overrides
INTERNAL_PointSelection.getCachedNodes
Defined in
lexical-table/src/LexicalGridSelection.ts:45
getCharacterOffsets
▸ getCharacterOffsets(): [number
, number
]
Returns the character-based offsets of the Selection, accounting for non-text Points by using the children size or text content.
Returns
[number
, number
]
the character offsets for the Selection
Inherited from
INTERNAL_PointSelection.getCharacterOffsets
Defined in
lexical/src/LexicalSelection.ts:344
getNodes
▸ getNodes(): LexicalNode
[]
Returns
Overrides
INTERNAL_PointSelection.getNodes
Defined in
lexical-table/src/LexicalGridSelection.ts:154
getShape
▸ getShape(): GridSelectionShape
Returns
Defined in
lexical-table/src/LexicalGridSelection.ts:105
getTextContent
▸ getTextContent(): string
Returns
string
Overrides
INTERNAL_PointSelection.getTextContent
Defined in
lexical-table/src/LexicalGridSelection.ts:312
insertNodes
▸ insertNodes(nodes
): void
Parameters
Name | Type |
---|---|
nodes | LexicalNode [] |
Returns
void
Overrides
INTERNAL_PointSelection.insertNodes
Defined in
lexical-table/src/LexicalGridSelection.ts:92
insertRawText
▸ insertRawText(text
): void
Parameters
Name | Type |
---|---|
text | string |
Returns
void
Overrides
INTERNAL_PointSelection.insertRawText
Defined in
lexical-table/src/LexicalGridSelection.ts:84
insertText
▸ insertText(): void
Returns
void
Overrides
INTERNAL_PointSelection.insertText
Defined in
lexical-table/src/LexicalGridSelection.ts:88
is
▸ is(selection
): boolean
Parameters
Name | Type |
---|---|
selection | null | BaseSelection |
Returns
boolean
Overrides
Defined in
lexical-table/src/LexicalGridSelection.ts:53
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.
Inherited from
INTERNAL_PointSelection.isBackward
Defined in
lexical/src/LexicalSelection.ts:334
isCollapsed
▸ isCollapsed(): boolean
Returns
boolean
Overrides
INTERNAL_PointSelection.isCollapsed
Defined in
lexical-table/src/LexicalGridSelection.ts:76
set
▸ set(gridKey
, anchorCellKey
, focusCellKey
): void
Parameters
Name | Type |
---|---|
gridKey | string |
anchorCellKey | string |
focusCellKey | string |
Returns
void
Defined in
lexical-table/src/LexicalGridSelection.ts:64
setCachedNodes
▸ setCachedNodes(nodes
): void
Parameters
Name | Type |
---|---|
nodes | null | LexicalNode [] |
Returns
void
Overrides
INTERNAL_PointSelection.setCachedNodes
Defined in
lexical-table/src/LexicalGridSelection.ts:49