# Rich text section element

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](https://workstation.repzo.com/docs/developers/block-kit/blocks/rich-text-block), [Rich text list element](https://workstation.repzo.com/docs/developers/block-kit/rich-text/rich-text-list-element) |

## Usage

Sections are the paragraphs of a [rich text block](https://workstation.repzo.com/docs/developers/block-kit/blocks/rich-text-block) and the items of a [rich text list](https://workstation.repzo.com/docs/developers/block-kit/rich-text/rich-text-list-element). A `\n` inside a `text` element starts a new line.

## Fields

| 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`](https://workstation.repzo.com/docs/developers/block-kit/rich-text/broadcast-rich-text-element), [`channel`](https://workstation.repzo.com/docs/developers/block-kit/rich-text/channel-rich-text-element), [`color`](https://workstation.repzo.com/docs/developers/block-kit/rich-text/color-rich-text-element), [`date`](https://workstation.repzo.com/docs/developers/block-kit/rich-text/date-rich-text-element), [`emoji`](https://workstation.repzo.com/docs/developers/block-kit/rich-text/emoji-rich-text-element), [`link`](https://workstation.repzo.com/docs/developers/block-kit/rich-text/link-rich-text-element), [`text`](https://workstation.repzo.com/docs/developers/block-kit/rich-text/text-rich-text-element), [`user`](https://workstation.repzo.com/docs/developers/block-kit/rich-text/user-rich-text-element) and [`usergroup`](https://workstation.repzo.com/docs/developers/block-kit/rich-text/usergroup-rich-text-element). | Required |

> **How Repzo Chat differs from Slack**
>
> - These Slack inline elements aren't rendered: `attachment_mention`, `canvas`, `canvas_user_mention`, `canvas_message_unfurl`, `citation`, `file`, `list_record`, `message_mention`, `salesforce_data_field`, `tag`, `team`, `work_object_mention` and `workflow_mention`. One with a `text` string shows that text; otherwise it's left out.

## Examples

### Text with styles and a mention

```json
{
  "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"
            }
          ]
        }
      ]
    }
  ]
}
```

## Related

- [Rich text elements](https://workstation.repzo.com/docs/developers/block-kit/rich-text)
- [Block Kit overview](https://workstation.repzo.com/docs/developers/block-kit)
