Skip to content

getSelectedNode

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/packages/editor/src/utils/lexicalHelpers.ts

Gets the selected node from the Lexical editor.

Signature

ts
function getSelectedNode(selection: RangeSelection): TextNode | ElementNode | null

Parameters

NameType
selectionRangeSelection

Returns: TextNode | ElementNode | null

Was this page helpful?

Download as PDF