Rich text input element
Allows users to enter formatted text in a WYSIWYG editor, much like the Repzo Chat composer.
| Type | rich_text_input |
| Available in | Modals, Home tab |
| Works in blocks | Input block |
Use the rich text input inside an input block. When the person submits the modal, your app receives the text as a rich text block under view.state.values[block_id][action_id]:
{ "type": "rich_text_input", "rich_text_value": { "type": "rich_text", "elements": [ { "type": "rich_text_section", "elements": [{ "type": "text", "text": "Next steps", "style": { "bold": true } }] }, { "type": "rich_text_list", "style": "bullet", "elements": [ { "type": "rich_text_section", "elements": [{ "type": "text", "text": "Send the pilot agreement" }] } ] } ] }}A required rich text input must contain some non-blank text. With dispatch_action: true on the input block, the element also sends a block_actions payload with the same rich_text_value on ⌘/Ctrl+Enter, or as the person types, depending on dispatch_action_config.
The web editor offers bold, italic, strikethrough, inline code, links, bulleted and numbered lists, quotes and code blocks.
Fields
Section titled “Fields”| Field | Type | Description | Required? |
|---|---|---|---|
type |
String | The type of element. In this case type is always rich_text_input. |
Required |
action_id |
String | An identifier for the input value when the parent view is submitted. You can use this when you receive a view_submission payload to identify the value of the input element (view.state.values[block_id][action_id]). Should be unique among all other action_ids in the containing block. Maximum length is 255 characters. If you leave it out, Repzo generates one. |
Optional |
initial_value |
Rich text block | The initial value in the rich text input when it is loaded. | Optional |
dispatch_action_config |
Dispatch action configuration object | A dispatch configuration object that determines when during text input the element returns a block_actions payload. Only used when the parent input block sets dispatch_action: true. Defaults to on_enter_pressed. |
Optional |
focus_on_load |
Boolean | Indicates whether the element will be set to auto focus within the view. Only one element can be set to true. Defaults to false. |
Optional |
placeholder |
Text object | A plain_text only text object that defines the placeholder text shown in the rich text input. Maximum length for the text in this field is 150 characters. |
Optional |
Examples
Section titled “Examples”A rich text input in a form
Section titled “A rich text input in a form”This example belongs in a modal view — the screenshot shows it in a modal.

{ "blocks": [ { "type": "input", "block_id": "meeting_notes", "label": { "type": "plain_text", "text": "Meeting notes" }, "element": { "type": "rich_text_input", "action_id": "notes", "placeholder": { "type": "plain_text", "text": "Decisions, objections, next steps…" }, "initial_value": { "type": "rich_text", "elements": [ { "type": "rich_text_section", "elements": [ { "type": "text", "text": "Next steps", "style": { "bold": true } } ] }, { "type": "rich_text_list", "style": "bullet", "elements": [ { "type": "rich_text_section", "elements": [ { "type": "text", "text": "Send the pilot agreement" } ] } ] } ] } } } ]}