Function: getSelectedNode()

getSelectedNode(selection): TextNode | ElementNode | null

Gets the selected node from the Lexical editor.

Parameters

ParameterType
selectionRangeSelection

Returns

TextNode | ElementNode | null