# EditTextToolApi.beginEdit()

```ts
beginEdit(blockId: string): Promise<void>
```

Opens a block for editing — what a double-click does. Needs `edit-text` and `extract`: the editor shows the block's words in the page.

- Kind: method
- Since: 1.0.0

| Parameter | Type | Description |
| --- | --- | --- |
| `blockId` | `string` | A block id from `listBlocks()` of the current detection pass. |

Returns `Promise<void>`

Throws:

- `INVALID_STATE` while the tool is not active — without `edit-text` it cannot be activated.
- `FEATURE_NOT_LICENSED` without `extract`.
- `INVALID_ARGUMENT` for a text block id that names no block.
- `PAGE_ERROR` when the block's page could not be loaded.

```ts
const [first] = blocks;
if (first) await viewer.tools.editText.beginEdit(first.id);
```

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/beginedit
