Function: getSelectionRectangle

getSelectionRectangle(editor): null | { height: number ; left: number ; top: number ; width: number }

Gets the coordinates of the selection in the Lexical editor.

Parameters

NameType
editorLexicalEditor

Returns

null | { height: number ; left: number ; top: number ; width: number }