# tools.editText

Part of [Tools](https://kernstra.com/docs/web-sdk/config/tools) in the Kernstra Web SDK 1.0.0 configuration reference.

- Type: `boolean | EditTextConfig`
- Default: `on, within the mode`
- Page: https://kernstra.com/docs/web-sdk/config/tools/edittext

Edit Text tool (inline PDF text editing): retyping and restyling the document's own text. Needs the `edit-text` license feature (opening or retyping a block from code, through `viewer.tools.editText`, also needs `extract`). Takes an `EditTextConfig` object; passing `true` is the same as `{}`. See [EditTextToolApi](https://kernstra.com/docs/web-sdk/api/viewer-tools-edittext) for the programmatic side.

```ts
// One block per paragraph is the default and the recommended grouping: nothing to set.
tools: { editText: true }
```

### `editText.blockDetection`

- Type: `'rows' | 'paragraphs'`
- Default: `'paragraphs'`
- Page: https://kernstra.com/docs/web-sdk/config/tools/edittext-blockdetection

How text is grouped into editable blocks. **Keep the default, `'paragraphs'`**: it is what Edit Text is built around. It makes one block per paragraph: the consecutive lines of one column that share leading and face are selected, moved and edited together, while columns, bullets, headings, table rows and lone numbers stay apart; a tagged document's own paragraph elements settle the grouping where it has them. Typing inside a paragraph reflows it within its box: words flow onto the next line and back, Enter starts a new line, every word keeps its own font, size and color, and a changed line keeps the paragraph's alignment, justified spacing included.

`'rows'` is an alternative, not an improvement: it makes one block per visual row, split where a gap reads as a column boundary, so each line of a paragraph is its own block and is selected, moved and edited on its own.

- `'paragraphs'`: Default, and recommended. One block per paragraph; typing reflows the paragraph within its box.
- `'rows'`: One block per visual row, split where a gap reads as a column boundary; a paragraph's lines are edited one at a time.

Web page: https://kernstra.com/docs/web-sdk/config/tools/edittext
