# EditTextToolApi.listBlocks()

```ts
listBlocks(pageIndex: number): Promise<EditableTextBlock[]>
```

The editable text blocks on a page, as `EditableTextBlock[]`. Each block's `text` is `''` under a license without `extract`.

- Kind: method
- Since: 1.0.0

| Parameter | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` | Zero-based page index. |

Returns `Promise<EditableTextBlock[]>`: Each `{ id, pageIndex, text, bounds, fontFamily, fontSize, fontWeight, isItalic, fillColor, opacity }`; `id` is stable within one detection pass, `text` includes an uncommitted edit, `bounds` is a `Rect` in page space.

Throws:

- `INVALID_STATE` while the tool is not active — without `edit-text` it cannot be activated.
- `INVALID_ARGUMENT` for a page index the document has not.
- `PAGE_ERROR` when the page could not be loaded.

```ts
const blocks = await viewer.tools.editText.listBlocks(0);
```

Part of [EditTextToolApi](https://kernstra.com/docs/web-sdk/api/viewer-tools-edittext) in the Kernstra Web SDK 1.0.0 API reference.

Web page: https://kernstra.com/docs/web-sdk/api/viewer-tools-edittext/listblocks
