Skip to content

A paragraph of rich text: a run of text, links, mentions, emoji and other inline elements.

Available in Messages, Modals, Home tab
Used in Rich text block, Rich text list element

Sections are the paragraphs of a rich text block and the items of a rich text list. A \n inside a text element starts a new line.

Field Type Description Required?
type String The type of sub-element; in this case, rich_text_section. Required
elements Object[] An array of rich text elements: broadcast, channel, color, date, emoji, link, text, user and usergroup. Required

Text with styles and a mention — how it renders in Repzo Chat

{
"blocks": [
{
"type": "rich_text",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "Hi "
},
{
"type": "user",
"user_id": "3f6c2a1e-8b4d-4c7a-9e21-5d0b7f9a1c34"
},
{
"type": "text",
"text": ", the "
},
{
"type": "text",
"text": "Q4 forecast",
"style": {
"bold": true
}
},
{
"type": "text",
"text": " is due "
},
{
"type": "text",
"text": "Friday",
"style": {
"italic": true
}
},
{
"type": "text",
"text": ". Use the template in "
},
{
"type": "link",
"url": "https://example.com/forecast-template",
"text": "Forecasts"
},
{
"type": "text",
"text": " "
},
{
"type": "emoji",
"name": "bar_chart"
}
]
}
]
}
]
}