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

# getFirstBlock

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

Defined in: selector.get-first-block.ts:19

Returns the first block at the current container scope.

When the focus is inside an editable container (e.g. a code block's line),
this returns the first block within that container (the first line). When
the focus is at root, or there is no selection, this returns the first
block in the document.