Skip to content

getSelectedTextBlocks

const getSelectedTextBlocks: EditorSelector<object[]>

Defined in: selector.get-selected-text-blocks.ts:17

Returns the text blocks touched by the selection, resolved at any depth.

Walks the tree between the selection endpoints and returns every text block found, regardless of container nesting. For toolbar state and anywhere that needs “text blocks with text in the selection”.