Class: GridSelection
lexical.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/src/LexicalSelection.ts:543
Properties
_cachedNodes
• _cachedNodes: null
| LexicalNode
[]
Inherited from
INTERNAL_PointSelection._cachedNodes
Defined in
lexical/src/LexicalSelection.ts:286
anchor
• anchor: PointType
Inherited from
INTERNAL_PointSelection.anchor
Defined in
lexical/src/LexicalSelection.ts:283
dirty
• dirty: boolean
Inherited from
Defined in
lexical/src/LexicalSelection.ts:285
focus
• focus: PointType
Inherited from
Defined in
lexical/src/LexicalSelection.ts:284
gridKey
• gridKey: string
Defined in
lexical/src/LexicalSelection.ts:541
Methods
clone
▸ clone(): GridSelection
Returns
Overrides
Defined in
lexical/src/LexicalSelection.ts:567
extract
▸ extract(): LexicalNode
[]
Returns
Overrides
INTERNAL_PointSelection.extract
Defined in
lexical/src/LexicalSelection.ts:575
getCachedNodes
▸ getCachedNodes(): null
| LexicalNode
[]
Returns
null
| LexicalNode
[]
Inherited from
INTERNAL_PointSelection.getCachedNodes
Defined in
lexical/src/LexicalSelection.ts:296
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:346
getNodes
▸ getNodes(): LexicalNode
[]
Returns
Overrides
INTERNAL_PointSelection.getNodes
Defined in
lexical/src/LexicalSelection.ts:649
getShape
▸ getShape(): GridSelectionShape
Returns
Defined in
lexical/src/LexicalSelection.ts:600
getTextContent
▸ getTextContent(): string
Returns
string
Overrides
INTERNAL_PointSelection.getTextContent
Defined in
lexical/src/LexicalSelection.ts:807
insertNodes
▸ insertNodes(nodes
): void
Parameters
Name | Type |
---|---|
nodes | LexicalNode [] |
Returns
void
Overrides
INTERNAL_PointSelection.insertNodes
Defined in
lexical/src/LexicalSelection.ts:587
insertRawText
▸ insertRawText(text
): void
Parameters
Name | Type |
---|---|
text | string |
Returns
void
Overrides
INTERNAL_PointSelection.insertRawText
Defined in
lexical/src/LexicalSelection.ts:579
insertText
▸ insertText(): void
Returns
void
Overrides
INTERNAL_PointSelection.insertText
Defined in
lexical/src/LexicalSelection.ts:583
is
▸ is(selection
): boolean
Parameters
Name | Type |
---|---|
selection | null | BaseSelection |
Returns
boolean
Overrides
Defined in
lexical/src/LexicalSelection.ts:548
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:336
isCollapsed
▸ isCollapsed(): boolean
Returns
boolean
Overrides
INTERNAL_PointSelection.isCollapsed
Defined in
lexical/src/LexicalSelection.ts:571
set
▸ set(gridKey
, anchorCellKey
, focusCellKey
): void
Parameters
Name | Type |
---|---|
gridKey | string |
anchorCellKey | string |
focusCellKey | string |
Returns
void
Defined in
lexical/src/LexicalSelection.ts:559
setCachedNodes
▸ setCachedNodes(nodes
): void
Parameters
Name | Type |
---|---|
nodes | null | LexicalNode [] |
Returns
void
Inherited from
INTERNAL_PointSelection.setCachedNodes
Defined in
lexical/src/LexicalSelection.ts:300