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

Properties

_cachedNodes

_cachedNodes: null | LexicalNode[]

Defined in

lexical/src/LexicalSelection.ts:284


anchor

anchor: PointType

Defined in

lexical/src/LexicalSelection.ts:281


dirty

dirty: boolean

Implementation of

BaseSelection.dirty

Defined in

lexical/src/LexicalSelection.ts:283


focus

focus: PointType

Defined in

lexical/src/LexicalSelection.ts:282

Methods

clone

Abstract clone(): INTERNAL_PointSelection

Returns

INTERNAL_PointSelection

Implementation of

BaseSelection.clone

Defined in

lexical/src/LexicalSelection.ts:317


extract

extract(): LexicalNode[]

Returns

LexicalNode[]

Implementation of

BaseSelection.extract

Defined in

lexical/src/LexicalSelection.ts:313


getCachedNodes

getCachedNodes(): null | LexicalNode[]

Returns

null | LexicalNode[]

Implementation of

BaseSelection.getCachedNodes

Defined in

lexical/src/LexicalSelection.ts:294


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


getNodes

Abstract getNodes(): LexicalNode[]

Returns

LexicalNode[]

Implementation of

BaseSelection.getNodes

Defined in

lexical/src/LexicalSelection.ts:319


getTextContent

Abstract getTextContent(): string

Returns

string

Implementation of

BaseSelection.getTextContent

Defined in

lexical/src/LexicalSelection.ts:321


insertNodes

Abstract insertNodes(nodes): void

Parameters

NameType
nodesLexicalNode[]

Returns

void

Implementation of

BaseSelection.insertNodes

Defined in

lexical/src/LexicalSelection.ts:327


insertRawText

Abstract insertRawText(text): void

Parameters

NameType
textstring

Returns

void

Implementation of

BaseSelection.insertRawText

Defined in

lexical/src/LexicalSelection.ts:325


insertText

Abstract insertText(text): void

Parameters

NameType
textstring

Returns

void

Implementation of

BaseSelection.insertText

Defined in

lexical/src/LexicalSelection.ts:323


is

is(selection): boolean

Parameters

NameType
selectionnull | BaseSelection

Returns

boolean

Implementation of

BaseSelection.is

Defined in

lexical/src/LexicalSelection.ts:302


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


isCollapsed

isCollapsed(): boolean

Returns

boolean

Defined in

lexical/src/LexicalSelection.ts:309


setCachedNodes

setCachedNodes(nodes): void

Parameters

NameType
nodesnull | LexicalNode[]

Returns

void

Implementation of

BaseSelection.setCachedNodes

Defined in

lexical/src/LexicalSelection.ts:298