# richText behaviour

*Open when a form needs formatted text the user edits, or when a shipped richText's toolbar, @-mentions or image upload do not do what was authored.*

The stored value is an HTML string, bindable only to a text/string field. Every plain consumer of that field shows the markup literally, and a table column never auto-derives the `richText` renderer — set explicitly, it still renders a tag-stripped plain-text preview, because the grid never renders field HTML. If the text is only ever read back as plain text, `textarea` is the right element; if nobody edits it, `html` is.

`editorMode: 'balloon'` (default) shows no toolbar until text is selected, so an empty field offers no visible formatting affordance. `'inline'` keeps a bar on screen.

Uploaded images persist as file records on the record, not inside the text, and the upload target is a LEAF, not a path: the runtime keeps only the last dot segment of `attachmentsField` and applies it to THIS form's own entity. `attachmentsField: 'Contacts.photo'` on a Deals form uploads to Deals' `photo` — if Deals happens to have a file field by that name, everything passes and the images land on the wrong entity's field silently.

On a form with NO bound entity the file target is null, so image upload is unwired rather than broken: the toolbar button and paste/drop simply do nothing, with no error. Set `allowFiles: false` there.

`canMention` defaults ON and its feed is a tenant-wide user search — it is never narrowed to the current record, even on a record-bound form (the renderer passes no record-scoping props). "Let them mention people on this deal" is not what ships.

In `readMode` — and on a kanban card — `collapseAfterLines` stops being an expander and becomes a CSS line clamp: the text is cut off with no control to reveal the rest.
