# findBlock (@salmonui/rich-text)

> The findBlock function of @salmonui/rich-text: Finds a block by id anywhere in the tree (depth-first, document order).

Canonical: https://salmonui.dev/docs/reference/rich-text/findBlock

```ts
import { findBlock } from '@salmonui/rich-text';
```

Entry index: https://salmonui.dev/docs/reference/rich-text (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/rich-text.md).

## Reference

Kind: function

```ts
function findBlock(blocks: readonly Block[], id: string): Block | undefined;
```

Finds a block by id anywhere in the tree (depth-first, document order).
