<!-- Generated by npm run gen:skill from ui/TextArea/skill.md - do not edit. -->

# TextArea

## `<textarea>`

- `wrap`: soft | hard | off
- `focus`, `length`, `required`, `error-message`, `warning-message`, `success-message`, `value`, `default`
- actions: error, success, valid, warning
- events: Blur, Changed, ContextMenu, Enter, Focus, Invalid, Key, Release, Saved, Select, Updated, Valid
- methods: activate, clear, execCommand, getSelectionLength, getSelectionValue, releaseEnter, search, searchAndReplace, setFont, takeEnter, wordWrap

```xml
<panel type="rows" gap="6" padding="5">
  <textarea name="wrapSoft" label="wrap=&quot;soft&quot;" width="fill" height="40" wrap="soft"
      default="This is a long line that will wrap onto a second line inside the box."/>
  <textarea name="wrapOff" label="wrap=&quot;off&quot;" width="fill" height="40" wrap="off"
      default="This is a long line that will scroll sideways instead of wrapping onto a second line."/>
</panel>
```

## Guidance

- Text is committed on leaving the field, on Enter and on Ctrl/Cmd key combinations - not per key.
- Bound: Changed fires at the first commit that changes the document (again only after a Saved), Saved when it is unchanged again. Unbound: Updated at each commit that changed the text.
- `required`: left empty it goes to the error state and fires Invalid, then Valid once filled.
- Size it with `height`; for code or XML use a codeeditor.
