Passed to TextEditor by the component that owns the text, which keeps it in its state (the editor is controlled).
value: string
onChange: (value: string) => void
Called on typing, and with the Markdown of the images once uploaded.
placeholder: string
disabled: boolean
rows: number
id: string
className: string
autoResize: boolean
Grows the textarea with its text instead of scrolling it.
onSubmit: () => void
Called on Ctrl/Cmd+Enter, but not while an image is still uploading.
onCancel: () => void
Called on Escape when no popup of the editor is left to close. Inline editors (an edit, a reply) pass it to mean "never mind".
onKeyDown: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void
Runs after the editor's own keys (autocompletes, Ctrl+Enter), and never while an IME is composing, so an Enter that confirms a candidate isn't taken for "send".
maxLength: number
Shows a counter and marks the textarea invalid past it. It doesn't stop the typing, so the caller must still refuse a longer text.
countFrom: number
The length from which the counter shows, 80% of maxLength by default:
a standing "0 / 5000" is noise, but the counter should turn up well
before the warning colour does.
mentionEveryone: boolean
Offers @everyone among the mention suggestions. The chat's composer
sets it for a role with chat:everyone, the one place it notifies.
aria-invalid: boolean
aria-describedby: string
Joined with the id of the editor's own upload notice when it shows one.