Skip to main content

Class: NodeSelection

lexical.NodeSelection

Implements

Constructors

constructor

new NodeSelection(objects): NodeSelection

Parameters

NameType
objectsSet<string>

Returns

NodeSelection

Defined in

packages/lexical/src/LexicalSelection.ts:247

Properties

_cachedNodes

_cachedNodes: null | LexicalNode[]

Implementation of

BaseSelection._cachedNodes

Defined in

packages/lexical/src/LexicalSelection.ts:244


_nodes

_nodes: Set<string>

Defined in

packages/lexical/src/LexicalSelection.ts:243


dirty

dirty: boolean

Implementation of

BaseSelection.dirty

Defined in

packages/lexical/src/LexicalSelection.ts:245

Methods

add

add(key): void

Parameters

NameType
keystring

Returns

void

Defined in

packages/lexical/src/LexicalSelection.ts:282


clear

clear(): void

Returns

void

Defined in

packages/lexical/src/LexicalSelection.ts:294


clone

clone(): NodeSelection

Returns

NodeSelection

Implementation of

BaseSelection.clone

Defined in

packages/lexical/src/LexicalSelection.ts:304


delete

delete(key): void

Parameters

NameType
keystring

Returns

void

Defined in

packages/lexical/src/LexicalSelection.ts:288


extract

extract(): LexicalNode[]

Returns

LexicalNode[]

Implementation of

BaseSelection.extract

Defined in

packages/lexical/src/LexicalSelection.ts:308


getCachedNodes

getCachedNodes(): null | LexicalNode[]

Returns

null | LexicalNode[]

Implementation of

BaseSelection.getCachedNodes

Defined in

packages/lexical/src/LexicalSelection.ts:253


getNodes

getNodes(): LexicalNode[]

Returns

LexicalNode[]

Implementation of

BaseSelection.getNodes

Defined in

packages/lexical/src/LexicalSelection.ts:339


getStartEndPoints

getStartEndPoints(): null

Returns

null

Implementation of

BaseSelection.getStartEndPoints

Defined in

packages/lexical/src/LexicalSelection.ts:278


getTextContent

getTextContent(): string

Returns

string

Implementation of

BaseSelection.getTextContent

Defined in

packages/lexical/src/LexicalSelection.ts:358


has

has(key): boolean

Parameters

NameType
keystring

Returns

boolean

Defined in

packages/lexical/src/LexicalSelection.ts:300


insertNodes

insertNodes(nodes): void

Parameters

NameType
nodesLexicalNode[]

Returns

void

Implementation of

BaseSelection.insertNodes

Defined in

packages/lexical/src/LexicalSelection.ts:320


insertRawText

insertRawText(text): void

Parameters

NameType
textstring

Returns

void

Implementation of

BaseSelection.insertRawText

Defined in

packages/lexical/src/LexicalSelection.ts:312


insertText

insertText(): void

Returns

void

Implementation of

BaseSelection.insertText

Defined in

packages/lexical/src/LexicalSelection.ts:316


is

is(selection): boolean

Parameters

NameType
selectionnull | BaseSelection

Returns

boolean

Implementation of

BaseSelection.is

Defined in

packages/lexical/src/LexicalSelection.ts:261


isBackward

isBackward(): boolean

Returns

boolean

Implementation of

BaseSelection.isBackward

Defined in

packages/lexical/src/LexicalSelection.ts:274


isCollapsed

isCollapsed(): boolean

Returns

boolean

Implementation of

BaseSelection.isCollapsed

Defined in

packages/lexical/src/LexicalSelection.ts:270


setCachedNodes

setCachedNodes(nodes): void

Parameters

NameType
nodesnull | LexicalNode[]

Returns

void

Implementation of

BaseSelection.setCachedNodes

Defined in

packages/lexical/src/LexicalSelection.ts:257