Class: PointSelection
lexical.PointSelection
Hierarchy
PointSelection
Implements
Constructors
constructor
• new PointSelection(anchor
, focus
)
Parameters
Name | Type |
---|---|
anchor | PointType |
focus | PointType |
Defined in
lexical/src/LexicalSelection.ts:283
Properties
_cachedNodes
• _cachedNodes: null
| LexicalNode
[]
Defined in
lexical/src/LexicalSelection.ts:281
anchor
• anchor: PointType
Defined in
lexical/src/LexicalSelection.ts:278
dirty
• dirty: boolean
Implementation of
Defined in
lexical/src/LexicalSelection.ts:280
focus
• focus: PointType
Defined in
lexical/src/LexicalSelection.ts:279
Methods
clone
▸ clone(): PointSelection
Returns
Implementation of
Defined in
lexical/src/LexicalSelection.ts:310
extract
▸ extract(): LexicalNode
[]
Returns
Implementation of
Defined in
lexical/src/LexicalSelection.ts:324
getCachedNodes
▸ getCachedNodes(): null
| LexicalNode
[]
Returns
null
| LexicalNode
[]
Defined in
lexical/src/LexicalSelection.ts:291
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
Defined in
lexical/src/LexicalSelection.ts:355
getNodes
▸ getNodes(): LexicalNode
[]
Returns
Implementation of
Defined in
lexical/src/LexicalSelection.ts:314
getTextContent
▸ getTextContent(): string
Returns
string
Implementation of
Defined in
lexical/src/LexicalSelection.ts:319
insertNodes
▸ insertNodes(nodes
): void
Parameters
Name | Type |
---|---|
nodes | LexicalNode [] |
Returns
void
Implementation of
Defined in
lexical/src/LexicalSelection.ts:336
insertRawText
▸ insertRawText(text
): void
Parameters
Name | Type |
---|---|
text | string |
Returns
void
Implementation of
Defined in
lexical/src/LexicalSelection.ts:332
insertText
▸ insertText(text
): void
Parameters
Name | Type |
---|---|
text | string |
Returns
void
Implementation of
Defined in
lexical/src/LexicalSelection.ts:328
is
▸ is(selection
): boolean
Parameters
Name | Type |
---|---|
selection | null | BaseSelection |
Returns
boolean
Implementation of
Defined in
lexical/src/LexicalSelection.ts:299
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.
Defined in
lexical/src/LexicalSelection.ts:345
isCollapsed
▸ isCollapsed(): boolean
Returns
boolean
Defined in
lexical/src/LexicalSelection.ts:306
setCachedNodes
▸ setCachedNodes(nodes
): void
Parameters
Name | Type |
---|---|
nodes | null | LexicalNode [] |
Returns
void
Defined in
lexical/src/LexicalSelection.ts:295