Rich text input
A formatted text field, with Slack's formatting toolbar, that reports a rich_text value.
rich_text_input collects text and hands it back as a rich_text block, the same structure Slack
uses for a message composed in its own WYSIWYG editor. It’s an input-block-only element: it
doesn’t appear in an actions block or as a section accessory, and, like file_input, Slack only
supports it in modals, not Home tabs.
New entry
Fields
type"rich_text_input"
Always `rich_text_input`.
"rich_text_input"action_id?string
Identifies this action in the interaction payload and as the key in `state.values`. Maximum length is 255 characters.
stringinitial_value?RichTextBlock
The rich_text content shown when the surface loads.
RichTextBlockplaceholder?PlainTextElement
Grey placeholder text shown when the field is empty. Maximum length is 150 characters.
PlainTextElementmin_lines?number
The minimum number of lines shown. Must be between 1 and 100.
numbermax_lines?number
The maximum number of lines shown before the field scrolls. Must be between 1 and 100.
number8dispatch_action_config?DispatchActionConfig
Configures which edits fire a `block_actions` payload while typing.
DispatchActionConfigfocus_on_load?boolean
Focuses this field when the surface loads. Only one element per view can set this.
booleanfalseExamples
With an initial value
initial_value takes a full rich_text block, the same shape you’d get back from the element
itself, not a plain string.
Sizing the field
min_lines sets the field’s starting height; max_lines (8 by default) caps how tall it grows
before it scrolls.
Interactivity
Typing calls onAction with the current content wrapped as a rich_text block, under
rich_text_value:
{
"type": "rich_text_input",
"action_id": "notes_input",
"block_id": "notes",
"action_ts": "1706000000.000100",
"rich_text_value": {
"type": "rich_text",
"elements": [
{
"type": "rich_text_section",
"elements": [{ "type": "text", "text": "Fixed the login redirect loop." }]
}
]
}
}
Reading the value
Every edit (and the initial value, if any) is written to state.values as { type, rich_text_value }:
{
"notes": {
"notes_input": {
"type": "rich_text_input",
"rich_text_value": {
"type": "rich_text",
"elements": [
{
"type": "rich_text_section",
"elements": [{ "type": "text", "text": "Fixed the login redirect loop." }]
}
]
}
}
}
}