Text object
Defines an object containing some text.
Formatted either as plain_text or using mrkdwn, our proprietary contribution to the much beloved Markdown standard.
Fields
| Field | Type | Description | Required? |
|---|---|---|---|
type | String | The formatting to use for this text object. Can be one of plain_textor mrkdwn. | Required |
text | String | The text for the block. This field accepts any of the standard text formatting markup when type is mrkdwn. The minimum length is 1 and maximum length is 3000 characters. | Required |
emoji | Boolean | Indicates whether emojis in a text field should be escaped into the colon emoji format. This field is only usable when type is plain_text. | Optional |
verbatim | Boolean | When set to false (as is default) URLs will be auto-converted into links, conversation names will be link-ified, and certain mentions will be automatically parsed. When set to true, Slack will continue to process all markdown formatting and manual parsing strings, but it won’t modify any plain-text content. For example, channel names will not be hyperlinked. This field is only usable when type is mrkdwn. |
Example
The text object must be used within another block or element, such as the header block, section block, button element, icon button element, or workflow button element. This example shows a section block containing a text object.
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "A message *with some bold text* and _some italicized text_."
}
}
]
}