Skip to main content

$isBlockFullySelected

function

Checks whether the selection covers the entire block: the selection's start point is at or before the first position inside blockNode and its end point is at or after the last position inside blockNode. A selection that extends beyond the block's boundaries still fully selects the block, and an empty block is fully selected by any selection that touches or surrounds it.

function $isBlockFullySelected(blockNode: ElementNode, selectionOrRange: RangeSelection | CaretRange): boolean

Import

import { $isBlockFullySelected } from '@modular/sdk/editor';

Notes

returns
true if the selection covers the entire blockNode