Text and HTML
Render plain text, Markdown, and sanitized HTML without unsafe assumptions.
LongText output depends on the field’s configured format.
| Format | Raw value | Generated HTML |
|---|---|---|
| Plain | String | None |
| Markdown | Markdown string | GraphQL <field>_html; REST with render=html |
| Rich | Tiptap JSON | GraphQL <field>_html; REST with render=html |
Authorization follows the containing resource, and hidden API fields remain absent. There is no separate field permission.
Markdown
query ArticleBody($id: ID!) {
article(id: $id) {
body
body_html
}
}
{
"body": "# Hello\n\n- one\n- two",
"body_html": "<h1>Hello</h1>\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>"
}
Markdown conversion supports GitHub Flavored Markdown and frontmatter parsing. The returned HTML is sanitized to a narrow tag and attribute allowlist.
Rich text
{
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [{ "type": "text", "text": "Hello" }]
}
]
}
Rich input delivers as structured JSON; its HTML sibling contains sanitized rendered markup. Unsupported nodes are reduced to renderable children, and unsafe scripts or links are removed.
REST render=html applies recursively to Components and eligible Term custom fields. HTML is null for empty input. A generated <field>_html sibling is omitted when a real field already uses that key.