This page is available as Markdown at /api/selectors/variables/getfocusblock.md.
For the full documentation index, see /llms.txt, or
the complete corpus at /llms-full.txt.
getFocusBlock
constgetFocusBlock:EditorSelector<{node:PortableTextBlock;path:BlockPath; } |undefined>
Defined in: selector.get-focus-block.ts:15
Returns the block containing the focus selection, resolved at any depth.
When the focus is inside an editable container (e.g. a code block’s line), this returns the innermost block ancestor (the line), not the outer container. When the focus is at root, behavior is unchanged.