Text element
Displays text, optionally styled.
| Available in | Messages, Modals, Home tab |
| Used in | Rich text section element, Rich text list element, Rich text quote element, Rich text preformatted element |
Fields
Section titled “Fields”| Field | Type | Description | Required? |
|---|---|---|---|
type |
String | The type of object; in this case, text. |
Required |
text |
String | The text shown to the reader. \n starts a new line. |
Required |
style |
Object | An object of optional boolean properties that dictate style: bold, code, italic, strike, highlight, client_highlight, underline and unlink. |
Optional |
Examples
Section titled “Examples”Styled text
Section titled “Styled text”
{ "blocks": [ { "type": "rich_text", "elements": [ { "type": "rich_text_section", "elements": [ { "type": "text", "text": "Status: " }, { "type": "text", "text": "Approved", "style": { "bold": true } }, { "type": "text", "text": " · Reference " }, { "type": "text", "text": "PO-1187", "style": { "code": true } }, { "type": "text", "text": " · " }, { "type": "text", "text": "Draft", "style": { "strike": true } } ] } ] } ]}