Rich text fields
A rich text field lets content authors enter and format text. This field type is not stored as an HTML block but is, instead, stored as JSON. This means that the data and the styling are separate in the API response as shown in the following partial request:
The full response is as follows:
RequestResponse
"id": "DUF_MbZzcEWHnHrHd0BAHA",
"name": "Blog post",
"fields": {
"body": {
"value": {
"type": "doc",
"content": [
{
"type": "heading",
"attrs": {
"level": 1
},
"content": [
{
"type": "text",
"text": "Heading 1"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Paragraph with "
},
{
"type": "text",
"marks": [
{
"type": "bold"
}
],
"text": "bold"
}
]
},
{
"type": "bulletList",
"content": [
{
"type": "listItem",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Bullet 1"
}
]
}
]
},
{
"type": "listItem",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Bullet 2"
}
]
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Code block"
}
]
},
{
"type": "codeBlock",
"attrs": {
"language": "json"
},
"content": [
{
"type": "text",
"text": "{\n \"id\": \"blog\",\n \"name\": {\n \"en-US\": \"blog\"\n },\n \"description\": {\n \"en-US\": \"\"\n },\n \"fields\": [\n {\n \"name\": {\n \"en-US\": \"title\"\n },\n \"id\": \"title\",\n \"type\": \"ShortText\",\n \"required\": true,\n \"limitation\": null,\n \"helpText\": {\n \"en-US\": \"\"\n }\n }\n ]\n}"
}
]
}
]
},
"type": "RichText"
}
}
}