Skip to main content

Class: INTERNAL_PointSelection

lexical.INTERNAL_PointSelection

This class is being used only for internal use case of migration GridSelection outside of core package. DO NOT USE THIS CLASS DIRECTLY.

Hierarchy

Implements

Constructors

constructor

new INTERNAL_PointSelection(anchor, focus)

Parameters

NameType
anchorPointType
focusPointType

Defined in

lexical/src/LexicalSelection.ts:288

Properties

_cachedNodes

_cachedNodes: null | LexicalNode[]

Defined in

lexical/src/LexicalSelection.ts:286


anchor

anchor: PointType

Defined in

lexical/src/LexicalSelection.ts:283


dirty

dirty: boolean

Implementation of

BaseSelection.dirty

Defined in

lexical/src/LexicalSelection.ts:285


focus

focus: PointType

Defined in

lexical/src/LexicalSelection.ts:284

Methods

clone

Abstract clone(): INTERNAL_PointSelection

Returns

INTERNAL_PointSelection

Implementation of

BaseSelection.clone

Defined in

lexical/src/LexicalSelection.ts:319


extract

extract(): LexicalNode[]

Returns

LexicalNode[]

Implementation of

BaseSelection.extract

Defined in

lexical/src/LexicalSelection.ts:315


getCachedNodes

getCachedNodes(): null | LexicalNode[]

Returns

null | LexicalNode[]

Implementation of

BaseSelection.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

Defined in

lexical/src/LexicalSelection.ts:346


getNodes

Abstract getNodes(): LexicalNode[]

Returns

LexicalNode[]

Implementation of

BaseSelection.getNodes

Defined in

lexical/src/LexicalSelection.ts:321


getTextContent

Abstract getTextContent(): string

Returns

string

Implementation of

BaseSelection.getTextContent

Defined in

lexical/src/LexicalSelection.ts:323


insertNodes

Abstract insertNodes(nodes): void

Parameters

NameType
nodesLexicalNode[]

Returns

void

Implementation of

BaseSelection.insertNodes

Defined in

lexical/src/LexicalSelection.ts:329


insertRawText

Abstract insertRawText(text): void

Parameters

NameType
textstring

Returns

void

Implementation of

BaseSelection.insertRawText

Defined in

lexical/src/LexicalSelection.ts:327


insertText

Abstract insertText(text): void

Parameters

NameType
textstring

Returns

void

Implementation of

BaseSelection.insertText

Defined in

lexical/src/LexicalSelection.ts:325


is

is(selection): boolean

Parameters

NameType
selectionnull | BaseSelection

Returns

boolean

Implementation of

BaseSelection.is

Defined in

lexical/src/LexicalSelection.ts:304


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:336


isCollapsed

isCollapsed(): boolean

Returns

boolean

Defined in

lexical/src/LexicalSelection.ts:311


setCachedNodes

setCachedNodes(nodes): void

Parameters

NameType
nodesnull | LexicalNode[]

Returns

void

Implementation of

BaseSelection.setCachedNodes

Defined in

lexical/src/LexicalSelection.ts:300