Skip to main content

isSelectionWithinEditor

function

Returns true if the given DOM anchor and focus nodes are inside the editor's root element and not captured by a decorator input.

function isSelectionWithinEditor(editor: LexicalEditor, anchorDOM: null | Node, focusDOM: null | Node): boolean

Import

import { isSelectionWithinEditor } from '@modular/sdk/editor';