---
{
  "id": "platform.doc.content-model-and-lossy-markdown",
  "topic": "doc",
  "title": "Doc content model and lossy Markdown",
  "locale": "en",
  "version": "2026-08-03",
  "summary": "The Markdown returned by get_doc is intentionally lossy, so safe edits must choose append or anchored formatting unless a full rich-format reset is acceptable.",
  "content": "`get_doc` returns `contentMd` with a truthful `contentLossy` boolean. It is `false` when the canonical Markdown round trip preserves normalized content, and `true` when the projection omits rich-only or unsupported structure. Font family, size, color, underline, alignment, line height, indentation, and page settings are not represented in Markdown. A get → edit → `update_doc` round trip replaces the full body and destroys any omitted rich-only details.\n\nChoose by intent. To add content, use `append_content`; its non-empty Markdown is converted to blocks and appended at the end while existing rich content stays intact. To change style locally, use `format_text` or `format_block`. Use `update_doc` only for a deliberate full rewrite when resetting rich-only formatting is acceptable.\n\nThe supported Markdown subset includes headings, bold, italic, strike, code, lists, task lists, tables, block quotes, links, images, and horizontal rules. Underline is rich-only and requires `format_text`. Unknown nodes degrade to visible plain text; unknown marks or attributes are dropped, so nonstandard Markdown or HTML cannot bypass the allowlist.\n\nCanonical content is limited to 5 MiB of JSON, 50,000 nodes, and nesting depth 64. Action arguments are separately capped at 64 KiB; build large documents through multiple appends. `contentMd` arguments and the get result are audit-redacted. An “invalid document content” error is `invalid_arguments`: fix the content instead of blindly retrying.\n",
  "aliases": [
    "lossy Markdown",
    "contentLossy",
    "replace document",
    "append content",
    "append a conclusion",
    "preserve rich formatting",
    "rich formatting loss",
    "Markdown round trip",
    "文件格式遺失"
  ],
  "tags": [
    "doc",
    "markdown",
    "content-model",
    "redaction"
  ],
  "relatedActions": [
    "arinova.doc.get_doc",
    "arinova.doc.update_doc",
    "arinova.doc.append_content",
    "arinova.doc.format_text",
    "arinova.doc.format_block"
  ],
  "relatedActionPrefixes": [],
  "url": "https://docs.arinova.ai/en/kb/doc/content-model-and-lossy-markdown/"
}
---

`get_doc` returns `contentMd` with a truthful `contentLossy` boolean. It is `false` when the canonical Markdown round trip preserves normalized content, and `true` when the projection omits rich-only or unsupported structure. Font family, size, color, underline, alignment, line height, indentation, and page settings are not represented in Markdown. A get → edit → `update_doc` round trip replaces the full body and destroys any omitted rich-only details.

Choose by intent. To add content, use `append_content`; its non-empty Markdown is converted to blocks and appended at the end while existing rich content stays intact. To change style locally, use `format_text` or `format_block`. Use `update_doc` only for a deliberate full rewrite when resetting rich-only formatting is acceptable.

The supported Markdown subset includes headings, bold, italic, strike, code, lists, task lists, tables, block quotes, links, images, and horizontal rules. Underline is rich-only and requires `format_text`. Unknown nodes degrade to visible plain text; unknown marks or attributes are dropped, so nonstandard Markdown or HTML cannot bypass the allowlist.

Canonical content is limited to 5 MiB of JSON, 50,000 nodes, and nesting depth 64. Action arguments are separately capped at 64 KiB; build large documents through multiple appends. `contentMd` arguments and the get result are audit-redacted. An “invalid document content” error is `invalid_arguments`: fix the content instead of blindly retrying.
