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

# getLastBlock

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

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

Returns the last block at the current container scope.

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