find(...) returns NodeAddress values (for example kind: "block"). For text selectors, query.match(...) returns deterministic mutation-ready data: item.target as a canonical SelectionTarget, item.handle.ref as a reusable resolved handle, and item.address as the matching NodeAddress.
Use item.handle.ref when you want multiple operations or a mutation plan to reuse the same resolved range. When you need to construct a selection from explicit anchors, call editor.doc.ranges.resolve(...) and use its target or handle.ref.
SelectionTarget is the canonical target for core selection mutations. Other APIs, such as comments or insertion-point operations, may still use TextAddress where the operation is defined around a specific text span or insertion point.
For DOCX documents, nodeId is derived from the file’s native w14:paraId attribute. In practice, this is usually stable when you reopen the same unchanged DOCX across separate editor sessions, machines, or headless CLI pipelines.For nodes created at runtime (not imported from DOCX), nodeId is still best-effort only. Many runtime nodes use session-scoped editor identity, and some structures such as tables or table cells may expose deterministic fallback IDs instead of a raw UUID-like sdBlockId. Either way, cross-session stability is not guaranteed.
ID source
Stable across loads?
When used
paraId (from DOCX)
Best effort (usually stable for unchanged DOCX blocks)
Paragraphs and table rows imported from DOCX
Runtime-derived ID
No guarantee (often session-scoped; some table addresses use deterministic fallbacks)
Nodes created programmatically before first export
If you need to reference blocks across separate editor sessions, use editor.doc.query.match() (or persist nodeId and reconstruct a NodeAddress): don’t read node.attrs.sdBlockId directly. The Document API resolves paraId first for DOCX-imported content and may derive safer public IDs for some runtime structures such as tables.
No block ID is guaranteed to survive all Microsoft Word round-trips or external document rewrites. Word and other tools may regenerate w14:paraId during structural changes (for example split/merge/rebuild operations), and SuperDoc may rewrite duplicate IDs on import to keep block targeting deterministic.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"SuperDoc","description":"Web-based DOCX editor with full Microsoft Word compatibility. Handle tracked changes, complex tables, and document automation. Works with any framework and AI agents.","colors":{"primary":"#6366F1","light":"#8968F6","dark":"#4F46E5"},"logo":{"light":"https://mintcdn.com/superdoc/7ZYpWaCC36-L9yl3/public/images/logo-light.png?fit=max\u0026auto=format\u0026n=7ZYpWaCC36-L9yl3\u0026q=85\u0026s=d12bb868024e11de2d975ef28a389361","dark":"https://mintcdn.com/superdoc/7ZYpWaCC36-L9yl3/public/images/logo-dark.png?fit=max\u0026auto=format\u0026n=7ZYpWaCC36-L9yl3\u0026q=85\u0026s=8485990741fdb814fdcc69825b9cb430","href":"https://docs.superdoc.dev"},"favicon":"https://mintcdn.com/superdoc/7ZYpWaCC36-L9yl3/public/images/favicon.png?fit=max\u0026auto=format\u0026n=7ZYpWaCC36-L9yl3\u0026q=85\u0026s=6e88dc958e94f27066e9754e2ac69445","api":{"playground":{"display":"interactive"}},"background":{"color":{"light":"#f8f8fc","dark":"#0a0a0f"}},"navbar":{"links":[{"href":"https://github.com/superdoc/docx-editor","type":"github"},{"href":"https://discord.com/invite/b9UuaZRyaB","label":"Discord","type":"discord"}],"primary":{"type":"button","label":"Talk to an engineer","href":"https://superdoc.dev/meetings/caio-pizzol"}},"seo":{"metatags":{"description":"Web-based DOCX editor with full Microsoft Word compatibility. Handle tracked changes, complex tables, and document automation. Works with any framework and AI agents.","keywords":"DOCX editor, Microsoft Word web editor, document automation, tracked changes, contract management, document API, Word compatibility, LLM document editing, AI document processing","author":"SuperDoc","og:type":"website","og:url":"https://docs.superdoc.dev","og:image":"public/images/og-image.png","og:description":"DOCX editor that handles real Microsoft Word documents on the web. Tracked changes, complex tables, full Word compatibility. Built for contract management and document automation.","og:site_name":"SuperDoc Documentation","twitter:card":"summary_large_image","twitter:site":"@superdocdev","twitter:title":"SuperDoc - Real Microsoft Word Documents on the Web","twitter:description":"DOCX editor with full Word compatibility. Handle tracked changes, complex tables, and document automation with AI support.","twitter:image":"public/images/twitter-card.png"},"indexing":"all"},"fonts":{"family":"Plus Jakarta Sans"},"icons":{"library":"lucide"},"integrations":{"gtm":{"tagId":"GTM-PHNMQSDL"},"posthog":{"apiKey":"phc_jBYwMLryemk0X6RErATTY6I5GSSIzmErvfMIakkfh24","apiHost":"https://us.i.posthog.com"}},"banner":{"content":"**SuperDoc v2 is available.** [Read the v2 docs](https://docs.superdoc.dev/)","dismissible":true},"contextual":{"options":["copy","chatgpt","claude",{"title":"Ask on Discord","description":"Join our support channel","icon":"/public/icons/discord.svg","href":"https://discord.com/channels/1299087524056010902/1299436491839246409"}],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"versions":[{"version":"v2","href":"https://docs.superdoc.dev"},{"version":"v1","default":true,"href":"https://docs-v1.superdoc.dev"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"superdoc","hasAudioNarration":false,"actualSubdomain":"superdoc","customDomains":["docs.superdoc.dev","docs-v1.superdoc.dev"],"gitSource":{"type":"github","owner":"superdoc","repo":"docx-editor","deployBranch":"stable","contentDirectory":"apps/docs","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a98bec81f42aa9c8f659e61","collectionId":"ea7dd850-7716-49f5-9a89-51a17059bf70","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6a98bec81f42aa9c8f659e61"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6a98bec81f42aa9c8f659e61","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"default","tag":"SuperDoc","count":104},{"language":"default","tag":"Editor","count":45},{"language":"default","tag":"Getting Started","count":16},{"language":"default","tag":"AI","count":14},{"language":"default","tag":"Custom UI","count":13},{"language":"default","tag":"Backend Services","count":10},{"language":"default","tag":"Document Engine","count":10},{"language":"default","tag":"Solutions","count":10},{"language":"default","tag":"Agents","count":9},{"language":"default","tag":"Collaboration","count":9}]},"assistantConfig":{"enableAskAiButton":true,"enableStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@superdoc.dev","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"#page-title{font-size:2.8rem!important;color:#1e74dd}.dark body,[data-theme=\"dark\"] body{background:rgb(var(--background-dark))!important}#search-bar-entry{border-radius:9999px!important}a[href*=\"meetings\"],a[href*=\"meetings\"] *{border-radius:9999px!important}a[href*=\"meetings\"]{background-color:#4f46e5!important;color:#fff!important;padding:0.5rem 1.25rem!important;font-family:Inter, sans-serif!important;font-size:0.875rem!important;font-weight:600!important;border:none!important;box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.05)!important;transition:background-color 0.15s,\n box-shadow 0.15s!important}a[href*=\"meetings\"]:hover{background-color:#4338ca!important;box-shadow:0 4px 12px rgba(79, 70, 229, 0.25)!important}a[href*=\"meetings\"] svg{display:none!important}a[href*=\"github.com/superdoc-dev\"] .truncate,a[href*=\"github.com/superdoc-dev\"] svg[style*=\"mask-image\"]{display:none!important}"}],"page":{"pagePath":"document-api/overview","slug":"/document-api/overview","pageMetadata":{"title":"Document API","sidebarTitle":"Overview","description":"A stable, engine-agnostic interface for programmatic document access","keywords":"document api, programmatic access, query documents, document manipulation, headless docx","href":"/document-api/overview"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"A stable, engine-agnostic interface for programmatic document access\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Document API gives you a consistent way to read and edit documents without relying on editor internals.`}),`\n`,_jsx(Heading,{level:`2`,id:`why-use-document-api`,children:`Why use Document API`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Build automations without editor-specific code.`}),`\n`,_jsx(_components.li,{children:`Work with predictable inputs and outputs defined per operation.`}),`\n`,_jsx(_components.li,{children:`Check capabilities up front and branch safely when features are unavailable.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`regex-selectors`,children:`Regex selectors`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Use `,_jsx(_components.code,{children:`mode: 'contains'`}),` for literal text. It does literal substring matching and is the default.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`mode: 'regex'`}),` accepts validated regular expressions. Patterns are checked for syntax, maximum length, and safety before execution.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`find(...)`}),` returns zero results.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`query.match(...)`}),` and selector-based plan resolution may surface as no match or `,_jsx(_components.code,{children:`MATCH_NOT_FOUND`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`assert`}),` steps count rejected regexes as zero matches.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`node-addressing`,children:`Node addressing`}),`\n`,_jsxs(_components.p,{children:[`Every block in a document has a `,_jsx(_components.code,{children:`nodeId`}),`: a string that uniquely identifies it.`]}),`\n`,_jsxs(_components.p,{children:[`For mutation targeting and `,_jsx(_components.code,{children:`getNode(...)`}),`, use `,_jsx(_components.code,{children:`NodeAddress`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"kind\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"block\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"nodeType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"paragraph\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"nodeId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3A2B1C0D\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`find(...)`}),` returns `,_jsx(_components.code,{children:`NodeAddress`}),` values (for example `,_jsx(_components.code,{children:`kind: \"block\"`}),`). For text selectors, `,_jsx(_components.code,{children:`query.match(...)`}),` returns deterministic mutation-ready data: `,_jsx(_components.code,{children:`item.target`}),` as a canonical `,_jsx(_components.code,{children:`SelectionTarget`}),`, `,_jsx(_components.code,{children:`item.handle.ref`}),` as a reusable resolved handle, and `,_jsx(_components.code,{children:`item.address`}),` as the matching `,_jsx(_components.code,{children:`NodeAddress`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`mutation-targeting`,children:`Mutation targeting`}),`\n`,_jsxs(_components.p,{children:[`Core selection mutations such as `,_jsx(_components.code,{children:`replace`}),`, `,_jsx(_components.code,{children:`delete`}),`, `,_jsx(_components.code,{children:`format.*`}),`, and selection-based mutation plans use `,_jsx(_components.code,{children:`SelectionTarget`}),` or a mutation-ready `,_jsx(_components.code,{children:`ref`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"kind\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"selection\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"start\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"kind\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"blockId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"p1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"offset\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"end\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"kind\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"blockId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"p1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"offset\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`item.target`}),` from `,_jsx(_components.code,{children:`query.match(...)`}),` for single direct operations:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` match`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` editor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`doc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`query`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`match`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` select:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'text'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`pattern:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'ACME Corp'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` require:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'first'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` target`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` match`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`items`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`target`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`target`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` editor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`doc`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`replace`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`target`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'NewCo Inc.'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`item.handle.ref`}),` when you want multiple operations or a mutation plan to reuse the same resolved range. When you need to construct a selection from explicit anchors, call `,_jsx(_components.code,{children:`editor.doc.ranges.resolve(...)`}),` and use its `,_jsx(_components.code,{children:`target`}),` or `,_jsx(_components.code,{children:`handle.ref`}),`.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`SelectionTarget`}),` is the canonical target for core selection mutations. Other APIs, such as comments or insertion-point operations, may still use `,_jsx(_components.code,{children:`TextAddress`}),` where the operation is defined around a specific text span or insertion point.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`stable-ids-across-loads`,children:`Stable IDs across loads`}),`\n`,_jsxs(_components.p,{children:[`For DOCX documents, `,_jsx(_components.code,{children:`nodeId`}),` is derived from the file’s native `,_jsx(_components.code,{children:`w14:paraId`}),` attribute. In practice, this is usually stable when you reopen the same unchanged DOCX across separate editor sessions, machines, or headless CLI pipelines.`]}),`\n`,_jsxs(_components.p,{children:[`For nodes created at runtime (not imported from DOCX), `,_jsx(_components.code,{children:`nodeId`}),` is still best-effort only. Many runtime nodes use session-scoped editor identity, and some structures such as tables or table cells may expose deterministic fallback IDs instead of a raw UUID-like `,_jsx(_components.code,{children:`sdBlockId`}),`. Either way, cross-session stability is not guaranteed.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`ID source`}),_jsx(_components.th,{children:`Stable across loads?`}),_jsx(_components.th,{children:`When used`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`paraId`}),` (from DOCX)`]}),_jsx(_components.td,{children:`Best effort (usually stable for unchanged DOCX blocks)`}),_jsx(_components.td,{children:`Paragraphs and table rows imported from DOCX`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Runtime-derived ID`}),_jsx(_components.td,{children:`No guarantee (often session-scoped; some table addresses use deterministic fallbacks)`}),_jsx(_components.td,{children:`Nodes created programmatically before first export`})]})]})]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`If you need to reference blocks across separate editor sessions, use `,_jsx(_components.code,{children:`editor.doc.query.match()`}),` (or persist `,_jsx(_components.code,{children:`nodeId`}),` and reconstruct a `,_jsx(_components.code,{children:`NodeAddress`}),`): don’t read `,_jsx(_components.code,{children:`node.attrs.sdBlockId`}),` directly. The Document API resolves `,_jsx(_components.code,{children:`paraId`}),` first for DOCX-imported content and may derive safer public IDs for some runtime structures such as tables.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`No block ID is guaranteed to survive all Microsoft Word round-trips or external document rewrites. Word and other tools may regenerate `,_jsx(_components.code,{children:`w14:paraId`}),` during structural changes (for example split/merge/rebuild operations), and SuperDoc may rewrite duplicate IDs on import to keep block targeting deterministic.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Document API","sidebarTitle":"Overview","description":"A stable, engine-agnostic interface for programmatic document access","keywords":"document api, programmatic access, query documents, document manipulation, headless docx","href":"/document-api/overview"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Why use Document API","slug":"why-use-document-api","depth":2,"children":[]},{"title":"Regex selectors","slug":"regex-selectors","depth":2,"children":[]},{"title":"Node addressing","slug":"node-addressing","depth":2,"children":[]},{"title":"Mutation targeting","slug":"mutation-targeting","depth":2,"children":[{"title":"Stable IDs across loads","slug":"stable-ids-across-loads","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/superdoc/2a25b218b1f621f2/scripts/sync-api-docs.js","/_mintlify/custom/superdoc/e9e42d59a3274a21/scripts/sync-sdk-docs.js","/_mintlify/custom/superdoc/44e55b05cccfd8b5/scripts/add-keywords.js"],"subdomain":"superdoc","siteName":"SuperDoc","title":"Document API - SuperDoc","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-06-20T16:51:28.521Z","originalFileLocation":"document-api/overview.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"A stable, engine-agnostic interface for programmatic document access\">\u003cmeta data-mint-head name=\"keywords\" content=\"document api, programmatic access, query documents, document manipulation, headless docx\">\u003cmeta data-mint-head name=\"application-name\" content=\"SuperDoc\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/superdoc/AG0BjQtnR-Pw0ape/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/superdoc/AG0BjQtnR-Pw0ape/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/superdoc/AG0BjQtnR-Pw0ape/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/superdoc/AG0BjQtnR-Pw0ape/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/superdoc/AG0BjQtnR-Pw0ape/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/superdoc/AG0BjQtnR-Pw0ape/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/superdoc/AG0BjQtnR-Pw0ape/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/superdoc/AG0BjQtnR-Pw0ape/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/superdoc/AG0BjQtnR-Pw0ape/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Document API - SuperDoc\">\u003cmeta data-mint-head property=\"og:description\" content=\"DOCX editor that handles real Microsoft Word documents on the web. Tracked changes, complex tables, full Word compatibility. Built for contract management and document automation.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"SuperDoc Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.superdoc.dev/document-api/overview\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://superdoc.mintlify.app/public/images/og-image.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"SuperDoc - Real Microsoft Word Documents on the Web\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"DOCX editor with full Word compatibility. Handle tracked changes, complex tables, and document automation with AI support.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://superdoc.mintlify.app/public/images/og-image.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/superdoc/AG0BjQtnR-Pw0ape/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"SuperDoc\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6366F1\">\u003cmeta data-mint-head name=\"author\" content=\"SuperDoc\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.superdoc.dev/document-api/overview\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/document-api/overview.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.superdoc.dev/#organization\",\"name\":\"SuperDoc\",\"url\":\"https://docs.superdoc.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/superdoc/7ZYpWaCC36-L9yl3/public/images/logo-light.png?fit=max\u0026auto=format\u0026n=7ZYpWaCC36-L9yl3\u0026q=85\u0026s=d12bb868024e11de2d975ef28a389361\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.superdoc.dev#website\",\"name\":\"SuperDoc\",\"url\":\"https://docs.superdoc.dev\",\"publisher\":{\"@id\":\"https://docs.superdoc.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.superdoc.dev/document-api/overview#webpage\",\"url\":\"https://docs.superdoc.dev/document-api/overview\",\"name\":\"Document API\",\"description\":\"A stable, engine-agnostic interface for programmatic document access\",\"dateModified\":\"2026-06-20T16:51:28.521Z\",\"isPartOf\":{\"@id\":\"https://docs.superdoc.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.superdoc.dev/document-api/overview#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.superdoc.dev/document-api/overview#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Document Engine\",\"item\":\"https://docs.superdoc.dev/document-engine/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Document API\",\"item\":\"https://docs.superdoc.dev/document-api/overview\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.superdoc.dev/document-api/overview#article\",\"headline\":\"Document API\",\"name\":\"Document API\",\"description\":\"A stable, engine-agnostic interface for programmatic document access\",\"url\":\"https://docs.superdoc.dev/document-api/overview\",\"mainEntityOfPage\":{\"@id\":\"https://docs.superdoc.dev/document-api/overview#webpage\"},\"image\":\"https://docs.superdoc.dev/public/images/og-image.png\",\"dateModified\":\"2026-06-20T16:51:28.521Z\",\"publisher\":{\"@id\":\"https://docs.superdoc.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.superdoc.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"SuperDoc\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"SuperDoc","nav":{"global":{"versions":[{"version":"v2","href":"https://docs.superdoc.dev"},{"version":"v1","default":true,"href":"https://docs-v1.superdoc.dev"}]},"tabs":[{"tab":"SuperDoc","groups":[{"group":"Getting Started","pages":[{"title":"Meet SuperDoc","sidebarTitle":"Introduction","href":"/getting-started/introduction"},{"title":"Quick start","href":"/getting-started/quickstart"},{"group":"Frameworks","pages":[{"title":"React Integration","sidebarTitle":"React","href":"/getting-started/frameworks/react"},{"title":"Vue Integration","sidebarTitle":"Vue","href":"/getting-started/frameworks/vue"},{"title":"Nuxt Integration","sidebarTitle":"Nuxt","href":"/getting-started/frameworks/nuxt"},{"title":"Angular Integration","sidebarTitle":"Angular","href":"/getting-started/frameworks/angular"},{"title":"Laravel Integration","sidebarTitle":"Laravel","href":"/getting-started/frameworks/laravel"},{"title":"Solid Integration","sidebarTitle":"Solid","href":"/getting-started/frameworks/solid"},{"title":"Vanilla JavaScript","sidebarTitle":"Vanilla JS","href":"/getting-started/frameworks/vanilla-js"}]},{"title":"Import and export","sidebarTitle":"Import/Export","href":"/getting-started/import-export"},{"title":"Font support","sidebarTitle":"Font Support","href":"/getting-started/fonts"},{"title":"Theme SuperDoc","sidebarTitle":"Theming","href":"/getting-started/theming"},{"title":"AI","sidebarTitle":"AI","href":"/getting-started/ai"}]},{"group":"Editor","pages":[{"group":"SuperDoc","pages":[{"title":"SuperDoc API","sidebarTitle":"Overview","href":"/editor/superdoc/overview"},{"title":"Configuration","href":"/editor/superdoc/configuration"},{"title":"Import and export reference","sidebarTitle":"Import/Export","href":"/editor/superdoc/import-export"},{"title":"Methods","href":"/editor/superdoc/methods"},{"title":"Surfaces","href":"/editor/superdoc/surfaces"},{"title":"Events","href":"/editor/superdoc/events"}]},{"group":"React","pages":[{"title":"React API","sidebarTitle":"Overview","href":"/editor/react/overview"},{"title":"Configuration","href":"/editor/react/configuration"},{"title":"Methods","href":"/editor/react/methods"},{"title":"Types","href":"/editor/react/types"}]},{"group":"Custom UI","tag":"NEW","pages":[{"title":"Build custom UI with SuperDoc","sidebarTitle":"Overview","href":"/editor/custom-ui/overview"},{"title":"React setup","href":"/editor/custom-ui/react-setup"},{"title":"Controller setup","href":"/editor/custom-ui/controller-setup"},{"title":"Toolbar and commands","sidebarTitle":"Built-in","href":"/editor/custom-ui/toolbar-and-commands"},{"title":"Custom commands","sidebarTitle":"Custom","href":"/editor/custom-ui/custom-commands"},{"title":"Comments","href":"/editor/custom-ui/comments"},{"title":"Custom track changes UI","sidebarTitle":"Track changes","href":"/editor/custom-ui/track-changes"},{"title":"Content controls","href":"/editor/custom-ui/content-controls"},{"title":"Custom right-click menu","sidebarTitle":"Context menu","href":"/editor/custom-ui/context-menu"},{"title":"Selection and viewport","href":"/editor/custom-ui/selection-and-viewport"},{"title":"Document control","sidebarTitle":"Document","href":"/editor/custom-ui/document-control"},{"title":"Navigation","sidebarTitle":"Navigation","href":"/editor/custom-ui/navigation"},{"title":"API reference","href":"/editor/custom-ui/api-reference"}]},{"group":"Built-in UI","pages":[{"title":"Built-in UI","sidebarTitle":"Overview","href":"/editor/built-in-ui/overview"},{"title":"Comments","href":"/editor/built-in-ui/comments"},{"title":"Track changes","sidebarTitle":"Track changes","href":"/editor/built-in-ui/track-changes"},{"title":"Toolbar","sidebarTitle":"Toolbar","href":"/editor/built-in-ui/toolbar"},{"title":"Link popover","sidebarTitle":"Link popover","href":"/editor/built-in-ui/links"},{"title":"Context menu","href":"/editor/built-in-ui/context-menu"}]},{"group":"Collaboration","pages":[{"title":"Collaboration","sidebarTitle":"Overview","href":"/editor/collaboration/overview"},{"title":"Quickstart","sidebarTitle":"Quickstart","href":"/editor/collaboration/quickstart"},{"title":"Upgrade to Collaboration","sidebarTitle":"Upgrade Later","href":"/editor/collaboration/upgrade-to-collaboration"},{"title":"Configuration","sidebarTitle":"Configuration","href":"/editor/collaboration/configuration"},{"title":"Storage","sidebarTitle":"Storage","href":"/editor/collaboration/storage"},{"group":"Guides","pages":[{"title":"Liveblocks","sidebarTitle":"Liveblocks","href":"/guides/collaboration/liveblocks"},{"title":"YHub","sidebarTitle":"YHub","href":"/guides/collaboration/yhub"},{"title":"Hocuspocus","sidebarTitle":"Hocuspocus","href":"/guides/collaboration/hocuspocus"},{"title":"SuperDoc Yjs Collaboration","sidebarTitle":"SuperDoc Yjs","href":"/guides/collaboration/superdoc-yjs"}]}]},{"group":"Spell check","pages":[{"title":"Spell check","sidebarTitle":"Overview","href":"/editor/spell-check/overview"},{"title":"Custom spell-check provider","sidebarTitle":"Custom provider","href":"/editor/spell-check/custom-provider"}]},{"group":"Theming","pages":[{"title":"Theming overview","sidebarTitle":"Overview","href":"/editor/theming/overview"},{"title":"Custom themes","sidebarTitle":"Custom themes","href":"/editor/theming/custom-themes"},{"title":"CSS variable migration","sidebarTitle":"CSS variables","href":"/editor/theming/css-variable-migration"}]},{"group":"PDF","pages":[{"title":"PDF viewer","sidebarTitle":"Viewer","href":"/editor/pdf"},{"title":"Whiteboard","sidebarTitle":"Whiteboard","href":"/editor/pdf/whiteboard"}]}]},{"group":"Document Engine","pages":[{"title":"Document Engine","sidebarTitle":"Overview","description":"The programmatic layer for reading, editing, and saving .docx files.","href":"/document-engine/overview"},{"group":"Document API","pages":[{"title":"Document API","sidebarTitle":"Overview","href":"/document-api/overview"},{"title":"Common workflows","sidebarTitle":"Common Workflows","description":"Recommended patterns for working with the Document API","href":"/document-api/common-workflows"},{"group":"Features","pages":[{"title":"Content controls","sidebarTitle":"Content controls","href":"/document-api/features/content-controls"}]},{"title":"Document API reference","sidebarTitle":"Reference","href":"/document-api/reference/index"},{"title":"Available operations","sidebarTitle":"Available Operations","href":"/document-api/available-operations"},{"title":"Migrate to the Document API","sidebarTitle":"Migrate to Document API","href":"/document-api/migration"}]},{"title":"SDKs","sidebarTitle":"Overview","href":"/document-engine/sdks"},{"title":"CLI","sidebarTitle":"CLI","href":"/document-engine/cli"},{"title":"Compare documents","sidebarTitle":"Diffing","href":"/document-engine/diffing"}]},{"group":"AI","tag":"NEW","pages":[{"title":"AI","sidebarTitle":"Overview","href":"/ai/overview"},{"group":"MCP","pages":[{"title":"MCP Server","sidebarTitle":"Overview","href":"/ai/mcp/overview"},{"title":"How to use","sidebarTitle":"How to use","href":"/ai/mcp/how-to-use"},{"title":"Debugging","sidebarTitle":"Debugging","href":"/ai/mcp/debugging"}]},{"group":"Agents","pages":[{"title":"AI Agents","sidebarTitle":"Overview","href":"/ai/agents/llm-tools"},{"title":"How it works","sidebarTitle":"How it works","href":"/ai/agents/architecture"},{"group":"Presets","pages":[{"title":"Core preset — the action surface","sidebarTitle":"Core preset (recommended)","href":"/ai/agents/core-preset"},{"title":"Legacy preset — grouped intent tools","sidebarTitle":"Legacy preset","href":"/ai/agents/legacy-preset"}]},{"title":"Custom actions","sidebarTitle":"Custom actions","href":"/ai/agents/custom-actions"},{"title":"How to use","sidebarTitle":"How to use","href":"/ai/agents/integrations"},{"title":"Best practices","sidebarTitle":"Best practices","href":"/ai/agents/best-practices"},{"title":"Debugging","sidebarTitle":"Debugging","href":"/ai/agents/debugging"},{"title":"LLM eval results","sidebarTitle":"Eval Results","href":"/ai/agents/eval-results"}]},{"title":"Skills","sidebarTitle":"Skills","href":"/ai/agents/skills"}]},{"group":"Solutions","pages":[{"title":"Solutions","sidebarTitle":"Overview","href":"/solutions/overview"},{"group":"eSign","pages":[{"title":"eSign","sidebarTitle":"Introduction","href":"/solutions/esign/introduction"},{"title":"Quick Start","href":"/solutions/esign/quickstart"},{"title":"Configuration","href":"/solutions/esign/configuration"},{"title":"API Reference","href":"/solutions/esign/api-reference"},{"title":"Backend Implementation","sidebarTitle":"Backend","href":"/solutions/esign/backend"}]},{"group":"Template Builder","pages":[{"title":"Template Builder","sidebarTitle":"Introduction","href":"/solutions/template-builder/introduction"},{"title":"Quick Start Guide","sidebarTitle":"Quick Start","href":"/solutions/template-builder/quickstart"},{"title":"Configuration Options","sidebarTitle":"Configuration","href":"/solutions/template-builder/configuration"},{"title":"API Reference","sidebarTitle":"API Reference","href":"/solutions/template-builder/api-reference"}]}]},{"group":"Resources","pages":[{"title":"Accessibility","href":"/guides/general/accessibility"},{"title":"Telemetry","sidebarTitle":"Telemetry","href":"/resources/telemetry"},{"title":"Trust \u0026 Security","sidebarTitle":"Security","href":"/guides/general/security"},{"title":null,"href":"/resources/license"},{"group":"Upgrade guides","pages":[{"title":"Breaking Changes v1.0.0","sidebarTitle":"Breaking Changes v1","href":"/guides/migration/breaking-changes-v1"},{"title":"Migrate from ProseMirror to SuperDoc","sidebarTitle":"Migrate from ProseMirror","href":"/guides/migration/prosemirror"}]}]}]},{"tab":"Backend Services","pages":[{"title":"Backend Services","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Document API - SuperDoc","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":["10e4515597"],"chunks":["BannerMarkdown-DicSZcaX.js","dist-CIQkMg3R.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-ClVdStUn.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js"]}