> For the complete documentation index, see [llms.txt](/llms.txt).
> The full corpus is at [llms-full.txt](/llms-full.txt).

# getFocusTextBlock

> `const` **getFocusTextBlock**: `EditorSelector`\<\{ `node`: `PortableTextTextBlock`; `path`: `BlockPath`; \} \| `undefined`\>

Defined in: selector.get-focus-text-block.ts:15

Returns the text 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 text block ancestor (the line), not the outer
container. When the focus is at root, behavior is unchanged.