Skip to content

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.

arinova.doc.get_doc, arinova.doc.update_doc, arinova.doc.append_content, arinova.doc.format_text, arinova.doc.format_block

Also known as

lossy Markdown, contentLossy, replace document, append content, append a conclusion, preserve rich formatting, rich formatting loss, Markdown round trip, 文件格式遺失


Machine-readable Markdown · Knowledge index

Build a7f47a5ca54ddcf7806cd48b81ce1b9827042766