packages/document-api/src/contract/*.
Document API is currently alpha and subject to breaking changes.
Browse by namespace
| Namespace | Canonical ops | Aliases | Total surface | Reference |
|---|---|---|---|---|
| Core | 13 | 0 | 13 | Open |
| Blocks | 1 | 0 | 1 | Open |
| Capabilities | 1 | 0 | 1 | Open |
| Create | 6 | 0 | 6 | Open |
| Sections | 18 | 0 | 18 | Open |
| Format | 44 | 1 | 45 | Open |
| Styles | 1 | 0 | 1 | Open |
| Lists | 29 | 0 | 29 | Open |
| Comments | 5 | 0 | 5 | Open |
| Track Changes | 3 | 0 | 3 | Open |
| Query | 1 | 0 | 1 | Open |
| Mutations | 2 | 0 | 2 | Open |
| Paragraph Formatting | 17 | 0 | 17 | Open |
| Paragraph Styles | 2 | 0 | 2 | Open |
| Tables | 42 | 0 | 42 | Open |
| History | 3 | 0 | 3 | Open |
| Table of Contents | 10 | 0 | 10 | Open |
| Images | 27 | 0 | 27 | Open |
| Hyperlinks | 6 | 0 | 6 | Open |
| Headers & Footers | 9 | 0 | 9 | Open |
| Content Controls | 55 | 0 | 55 | Open |
| Bookmarks | 5 | 0 | 5 | Open |
| Footnotes | 6 | 0 | 6 | Open |
| Cross-References | 5 | 0 | 5 | Open |
| Index | 11 | 0 | 11 | Open |
| Captions | 6 | 0 | 6 | Open |
| Fields | 5 | 0 | 5 | Open |
| Citations | 15 | 0 | 15 | Open |
| Table of Authorities | 11 | 0 | 11 | Open |
Available operations
The tables below are grouped by namespace.Core
| Operation | API member path | Description |
|---|---|---|
get | editor.doc.get(…) | Read the full document as an SDDocument structure. |
find | editor.doc.find(…) | Search the document for text or node matches using SDM/1 selectors. |
getNode | editor.doc.getNode(…) | Retrieve a single node by target position. |
getNodeById | editor.doc.getNodeById(…) | Retrieve a single node by its unique ID. |
getText | editor.doc.getText(…) | Extract the plain-text content of the document. |
getMarkdown | editor.doc.getMarkdown(…) | Extract the document content as a Markdown string. |
getHtml | editor.doc.getHtml(…) | Extract the document content as an HTML string. |
markdownToFragment | editor.doc.markdownToFragment(…) | Convert a Markdown string into an SDM/1 structural fragment. |
info | editor.doc.info(…) | Return document metadata including revision, node count, and capabilities. |
clearContent | editor.doc.clearContent(…) | Clear all document body content, leaving a single empty paragraph. |
insert | editor.doc.insert(…) | Insert content at a target position, or at the end of the document when target is omitted. Accepts two input shapes: legacy string-based (value + type) or structural SDFragment (content). Supports text (default), markdown, and html content types via the type field in legacy mode. Structural mode accepts an SDFragment with typed nodes (paragraphs, tables, images, etc.). |
replace | editor.doc.replace(…) | Replace content at a target position with new content. Accepts two input shapes: legacy string-based (text) or structural SDFragment (content). Structural mode replaces the target range with typed nodes (paragraphs, tables, images, etc.). |
delete | editor.doc.delete(…) | Delete content at a target position. |
Blocks
| Operation | API member path | Description |
|---|---|---|
blocks.delete | editor.doc.blocks.delete(…) | Delete an entire block node (paragraph, heading, list item, table, image, or sdt) deterministically. |
Capabilities
| Operation | API member path | Description |
|---|---|---|
capabilities.get | editor.doc.capabilities() | Query runtime capabilities supported by the current document engine. |
Create
| Operation | API member path | Description |
|---|---|---|
create.paragraph | editor.doc.create.paragraph(…) | Create a new paragraph at the target position. |
create.heading | editor.doc.create.heading(…) | Create a new heading at the target position. |
create.sectionBreak | editor.doc.create.sectionBreak(…) | Create a section break at the target location with optional initial section properties. |
create.table | editor.doc.create.table(…) | Create a new table at the target position. |
create.tableOfContents | editor.doc.create.tableOfContents(…) | Insert a new table of contents at the target position. |
create.image | editor.doc.create.image(…) | Insert a new image at the target position. |
Sections
| Operation | API member path | Description |
|---|---|---|
sections.list | editor.doc.sections.list(…) | List sections in deterministic order with section-target handles. |
sections.get | editor.doc.sections.get(…) | Retrieve full section information by section address. |
sections.setBreakType | editor.doc.sections.setBreakType(…) | Set the section break type. |
sections.setPageMargins | editor.doc.sections.setPageMargins(…) | Set page-edge margins for a section. |
sections.setHeaderFooterMargins | editor.doc.sections.setHeaderFooterMargins(…) | Set header/footer margin distances for a section. |
sections.setPageSetup | editor.doc.sections.setPageSetup(…) | Set page size/orientation properties for a section. |
sections.setColumns | editor.doc.sections.setColumns(…) | Set column configuration for a section. |
sections.setLineNumbering | editor.doc.sections.setLineNumbering(…) | Enable or configure line numbering for a section. |
sections.setPageNumbering | editor.doc.sections.setPageNumbering(…) | Set page numbering format/start for a section. |
sections.setTitlePage | editor.doc.sections.setTitlePage(…) | Enable or disable title-page behavior for a section. |
sections.setOddEvenHeadersFooters | editor.doc.sections.setOddEvenHeadersFooters(…) | Enable or disable odd/even header-footer mode in document settings. |
sections.setVerticalAlign | editor.doc.sections.setVerticalAlign(…) | Set vertical page alignment for a section. |
sections.setSectionDirection | editor.doc.sections.setSectionDirection(…) | Set section text flow direction (LTR/RTL). |
sections.setHeaderFooterRef | editor.doc.sections.setHeaderFooterRef(…) | Set or replace a section header/footer reference for a variant. |
sections.clearHeaderFooterRef | editor.doc.sections.clearHeaderFooterRef(…) | Clear a section header/footer reference for a specific variant. |
sections.setLinkToPrevious | editor.doc.sections.setLinkToPrevious(…) | Set or clear link-to-previous behavior for a header/footer variant. |
sections.setPageBorders | editor.doc.sections.setPageBorders(…) | Set page border configuration for a section. |
sections.clearPageBorders | editor.doc.sections.clearPageBorders(…) | Clear page border configuration for a section. |
Format
| Operation | API member path | Description |
|---|---|---|
format.apply | editor.doc.format.apply(…) | Apply inline run-property patch changes to the target range with explicit set/clear semantics. |
format.bold | editor.doc.format.bold(…) | Set or clear the bold inline run property on the target text range. |
format.italic | editor.doc.format.italic(…) | Set or clear the italic inline run property on the target text range. |
format.strike | editor.doc.format.strike(…) | Set or clear the strike inline run property on the target text range. |
format.underline | editor.doc.format.underline(…) | Set or clear the underline inline run property on the target text range. |
format.highlight | editor.doc.format.highlight(…) | Set or clear the highlight inline run property on the target text range. |
format.color | editor.doc.format.color(…) | Set or clear the color inline run property on the target text range. |
format.fontSize | editor.doc.format.fontSize(…) | Set or clear the fontSize inline run property on the target text range. |
format.fontFamily | editor.doc.format.fontFamily(…) | Set or clear the fontFamily inline run property on the target text range. |
format.letterSpacing | editor.doc.format.letterSpacing(…) | Set or clear the letterSpacing inline run property on the target text range. |
format.vertAlign | editor.doc.format.vertAlign(…) | Set or clear the vertAlign inline run property on the target text range. |
format.position | editor.doc.format.position(…) | Set or clear the position inline run property on the target text range. |
format.dstrike | editor.doc.format.dstrike(…) | Set or clear the dstrike inline run property on the target text range. |
format.smallCaps | editor.doc.format.smallCaps(…) | Set or clear the smallCaps inline run property on the target text range. |
format.caps | editor.doc.format.caps(…) | Set or clear the caps inline run property on the target text range. |
format.shading | editor.doc.format.shading(…) | Set or clear the shading inline run property on the target text range. |
format.border | editor.doc.format.border(…) | Set or clear the border inline run property on the target text range. |
format.outline | editor.doc.format.outline(…) | Set or clear the outline inline run property on the target text range. |
format.shadow | editor.doc.format.shadow(…) | Set or clear the shadow inline run property on the target text range. |
format.emboss | editor.doc.format.emboss(…) | Set or clear the emboss inline run property on the target text range. |
format.imprint | editor.doc.format.imprint(…) | Set or clear the imprint inline run property on the target text range. |
format.charScale | editor.doc.format.charScale(…) | Set or clear the charScale inline run property on the target text range. |
format.kerning | editor.doc.format.kerning(…) | Set or clear the kerning inline run property on the target text range. |
format.vanish | editor.doc.format.vanish(…) | Set or clear the vanish inline run property on the target text range. |
format.webHidden | editor.doc.format.webHidden(…) | Set or clear the webHidden inline run property on the target text range. |
format.specVanish | editor.doc.format.specVanish(…) | Set or clear the specVanish inline run property on the target text range. |
format.rtl | editor.doc.format.rtl(…) | Set or clear the rtl inline run property on the target text range. |
format.cs | editor.doc.format.cs(…) | Set or clear the cs inline run property on the target text range. |
format.bCs | editor.doc.format.bCs(…) | Set or clear the bCs inline run property on the target text range. |
format.iCs | editor.doc.format.iCs(…) | Set or clear the iCs inline run property on the target text range. |
format.eastAsianLayout | editor.doc.format.eastAsianLayout(…) | Set or clear the eastAsianLayout inline run property on the target text range. |
format.em | editor.doc.format.em(…) | Set or clear the em inline run property on the target text range. |
format.fitText | editor.doc.format.fitText(…) | Set or clear the fitText inline run property on the target text range. |
format.snapToGrid | editor.doc.format.snapToGrid(…) | Set or clear the snapToGrid inline run property on the target text range. |
format.lang | editor.doc.format.lang(…) | Set or clear the lang inline run property on the target text range. |
format.oMath | editor.doc.format.oMath(…) | Set or clear the oMath inline run property on the target text range. |
format.rStyle | editor.doc.format.rStyle(…) | Set or clear the rStyle inline run property on the target text range. |
format.rFonts | editor.doc.format.rFonts(…) | Set or clear the rFonts inline run property on the target text range. |
format.fontSizeCs | editor.doc.format.fontSizeCs(…) | Set or clear the fontSizeCs inline run property on the target text range. |
format.ligatures | editor.doc.format.ligatures(…) | Set or clear the ligatures inline run property on the target text range. |
format.numForm | editor.doc.format.numForm(…) | Set or clear the numForm inline run property on the target text range. |
format.numSpacing | editor.doc.format.numSpacing(…) | Set or clear the numSpacing inline run property on the target text range. |
format.stylisticSets | editor.doc.format.stylisticSets(…) | Set or clear the stylisticSets inline run property on the target text range. |
format.contextualAlternates | editor.doc.format.contextualAlternates(…) | Set or clear the contextualAlternates inline run property on the target text range. |
format.strikethrough | editor.doc.format.strikethrough(…) | Convenience alias for format.strike with value: true. |
Styles
| Operation | API member path | Description |
|---|---|---|
styles.apply | editor.doc.styles.apply(…) | Apply document-level default style changes to the stylesheet (word/styles.xml). Targets docDefaults run and paragraph channels with set-style patch semantics. |
Lists
| Operation | API member path | Description |
|---|---|---|
lists.list | editor.doc.lists.list(…) | List all list nodes in the document, optionally filtered by scope. |
lists.get | editor.doc.lists.get(…) | Retrieve a specific list node by target. |
lists.insert | editor.doc.lists.insert(…) | Insert a new list at the target position. |
lists.create | editor.doc.lists.create(…) | Create a new list from one or more paragraphs, or convert existing paragraphs into a new list. |
lists.attach | editor.doc.lists.attach(…) | Convert non-list paragraphs to list items under an existing list sequence. |
lists.detach | editor.doc.lists.detach(…) | Remove numbering properties from list items, converting them to plain paragraphs. |
lists.indent | editor.doc.lists.indent(…) | Increase the indentation level of a list item. |
lists.outdent | editor.doc.lists.outdent(…) | Decrease the indentation level of a list item. |
lists.join | editor.doc.lists.join(…) | Merge two adjacent list sequences into one. |
lists.canJoin | editor.doc.lists.canJoin(…) | Check whether two adjacent list sequences can be joined. |
lists.separate | editor.doc.lists.separate(…) | Split a list sequence at the target item, creating a new sequence from that point forward. |
lists.setLevel | editor.doc.lists.setLevel(…) | Set the absolute nesting level (0..8) of a list item. |
lists.setValue | editor.doc.lists.setValue(…) | Set an explicit numbering value at the target item. Mid-sequence targets are atomically separated first. |
lists.continuePrevious | editor.doc.lists.continuePrevious(…) | Continue numbering from the nearest compatible previous list sequence. |
lists.canContinuePrevious | editor.doc.lists.canContinuePrevious(…) | Check whether the target sequence can continue numbering from a previous compatible sequence. |
lists.setLevelRestart | editor.doc.lists.setLevelRestart(…) | Set the restart behavior for a specific list level. |
lists.convertToText | editor.doc.lists.convertToText(…) | Convert list items to plain paragraphs, optionally prepending the rendered marker text. |
lists.applyTemplate | editor.doc.lists.applyTemplate(…) | Apply a captured ListTemplate to the target list, optionally filtered to specific levels. |
lists.applyPreset | editor.doc.lists.applyPreset(…) | Apply a built-in list formatting preset to the target list. |
lists.setType | editor.doc.lists.setType(…) | Convert a list to ordered or bullet and merge adjacent compatible sequences to preserve continuous numbering. |
lists.captureTemplate | editor.doc.lists.captureTemplate(…) | Capture the formatting of a list as a reusable ListTemplate. |
lists.setLevelNumbering | editor.doc.lists.setLevelNumbering(…) | Set the numbering format, pattern, and optional start value for a specific list level. |
lists.setLevelBullet | editor.doc.lists.setLevelBullet(…) | Set the bullet marker text for a specific list level. |
lists.setLevelPictureBullet | editor.doc.lists.setLevelPictureBullet(…) | Set a picture bullet for a specific list level by its OOXML lvlPicBulletId. |
lists.setLevelAlignment | editor.doc.lists.setLevelAlignment(…) | Set the marker alignment (left, center, right) for a specific list level. |
lists.setLevelIndents | editor.doc.lists.setLevelIndents(…) | Set the paragraph indentation values (left, hanging, firstLine) for a specific list level. |
lists.setLevelTrailingCharacter | editor.doc.lists.setLevelTrailingCharacter(…) | Set the trailing character (tab, space, nothing) after the marker for a specific list level. |
lists.setLevelMarkerFont | editor.doc.lists.setLevelMarkerFont(…) | Set the font family used for the marker character at a specific list level. |
lists.clearLevelOverrides | editor.doc.lists.clearLevelOverrides(…) | Remove instance-level overrides for a specific list level, restoring abstract definition values. |
Comments
| Operation | API member path | Description |
|---|---|---|
comments.create | editor.doc.comments.create(…) | Create a new comment thread (or reply when parentCommentId is given). |
comments.patch | editor.doc.comments.patch(…) | Patch fields on an existing comment (text, target, status, or isInternal). |
comments.delete | editor.doc.comments.delete(…) | Remove a comment or reply by ID. |
comments.get | editor.doc.comments.get(…) | Retrieve a single comment thread by ID. |
comments.list | editor.doc.comments.list(…) | List all comment threads in the document. |
Track Changes
| Operation | API member path | Description |
|---|---|---|
trackChanges.list | editor.doc.trackChanges.list(…) | List all tracked changes in the document. |
trackChanges.get | editor.doc.trackChanges.get(…) | Retrieve a single tracked change by ID. |
trackChanges.decide | editor.doc.trackChanges.decide(…) | Accept or reject a tracked change (by ID or scope: all). |
Query
| Operation | API member path | Description |
|---|---|---|
query.match | editor.doc.query.match(…) | Deterministic selector-based search with cardinality contracts for mutation targeting. |
Mutations
| Operation | API member path | Description |
|---|---|---|
mutations.preview | editor.doc.mutations.preview(…) | Dry-run a mutation plan, returning resolved targets without applying changes. |
mutations.apply | editor.doc.mutations.apply(…) | Execute a mutation plan atomically against the document. |
Paragraph Formatting
| Operation | API member path | Description |
|---|---|---|
format.paragraph.resetDirectFormatting | editor.doc.format.paragraph.resetDirectFormatting(…) | Strip all direct paragraph formatting while preserving style reference, numbering, and section metadata. |
format.paragraph.setAlignment | editor.doc.format.paragraph.setAlignment(…) | Set paragraph alignment (justification) on a paragraph-like block. |
format.paragraph.clearAlignment | editor.doc.format.paragraph.clearAlignment(…) | Remove direct paragraph alignment, reverting to style-defined or default alignment. |
format.paragraph.setIndentation | editor.doc.format.paragraph.setIndentation(…) | Set paragraph indentation properties (left, right, firstLine, hanging) in twips. |
format.paragraph.clearIndentation | editor.doc.format.paragraph.clearIndentation(…) | Remove all direct paragraph indentation. |
format.paragraph.setSpacing | editor.doc.format.paragraph.setSpacing(…) | Set paragraph spacing properties (before, after, line, lineRule) in twips. |
format.paragraph.clearSpacing | editor.doc.format.paragraph.clearSpacing(…) | Remove all direct paragraph spacing. |
format.paragraph.setKeepOptions | editor.doc.format.paragraph.setKeepOptions(…) | Set keep-with-next, keep-lines-together, and widow/orphan control flags. |
format.paragraph.setOutlineLevel | editor.doc.format.paragraph.setOutlineLevel(…) | Set the paragraph outline level (0–9) or null to clear. |
format.paragraph.setFlowOptions | editor.doc.format.paragraph.setFlowOptions(…) | Set contextual spacing, page-break-before, and suppress-auto-hyphens flags. |
format.paragraph.setTabStop | editor.doc.format.paragraph.setTabStop(…) | Add or replace a tab stop at a given position. |
format.paragraph.clearTabStop | editor.doc.format.paragraph.clearTabStop(…) | Remove a tab stop at a given position. |
format.paragraph.clearAllTabStops | editor.doc.format.paragraph.clearAllTabStops(…) | Remove all tab stops from a paragraph. |
format.paragraph.setBorder | editor.doc.format.paragraph.setBorder(…) | Set border properties for a specific side of a paragraph. |
format.paragraph.clearBorder | editor.doc.format.paragraph.clearBorder(…) | Remove border for a specific side or all sides of a paragraph. |
format.paragraph.setShading | editor.doc.format.paragraph.setShading(…) | Set paragraph shading (background fill, pattern color, pattern type). |
format.paragraph.clearShading | editor.doc.format.paragraph.clearShading(…) | Remove all paragraph shading. |
Paragraph Styles
| Operation | API member path | Description |
|---|---|---|
styles.paragraph.setStyle | editor.doc.styles.paragraph.setStyle(…) | Set the paragraph style reference (w:pStyle) on a paragraph-like block. |
styles.paragraph.clearStyle | editor.doc.styles.paragraph.clearStyle(…) | Remove the paragraph style reference from a paragraph-like block. |
Tables
| Operation | API member path | Description |
|---|---|---|
tables.convertFromText | editor.doc.tables.convertFromText(…) | Convert a text range into a table. |
tables.delete | editor.doc.tables.delete(…) | Delete the target table from the document. |
tables.clearContents | editor.doc.tables.clearContents(…) | Clear the contents of the target table or cell range. |
tables.move | editor.doc.tables.move(…) | Move a table to a new position in the document. |
tables.split | editor.doc.tables.split(…) | Split a table into two tables at the target row. |
tables.convertToText | editor.doc.tables.convertToText(…) | Convert a table back to plain text. |
tables.setLayout | editor.doc.tables.setLayout(…) | Set the layout mode of the target table. |
tables.insertRow | editor.doc.tables.insertRow(…) | Insert a new row into the target table. |
tables.deleteRow | editor.doc.tables.deleteRow(…) | Delete a row from the target table. |
tables.setRowHeight | editor.doc.tables.setRowHeight(…) | Set the height of a table row. |
tables.distributeRows | editor.doc.tables.distributeRows(…) | Distribute row heights evenly across the target table. |
tables.setRowOptions | editor.doc.tables.setRowOptions(…) | Set options on a table row such as header repeat or page break. |
tables.insertColumn | editor.doc.tables.insertColumn(…) | Insert a new column into the target table. |
tables.deleteColumn | editor.doc.tables.deleteColumn(…) | Delete a column from the target table. |
tables.setColumnWidth | editor.doc.tables.setColumnWidth(…) | Set the width of a table column. |
tables.distributeColumns | editor.doc.tables.distributeColumns(…) | Distribute column widths evenly across the target table. |
tables.insertCell | editor.doc.tables.insertCell(…) | Insert a new cell into a table row. |
tables.deleteCell | editor.doc.tables.deleteCell(…) | Delete a cell from a table row. |
tables.mergeCells | editor.doc.tables.mergeCells(…) | Merge a range of table cells into one. |
tables.unmergeCells | editor.doc.tables.unmergeCells(…) | Unmerge a previously merged table cell. |
tables.splitCell | editor.doc.tables.splitCell(…) | Split a table cell into multiple cells. |
tables.setCellProperties | editor.doc.tables.setCellProperties(…) | Set properties on a table cell such as vertical alignment or text direction. |
tables.sort | editor.doc.tables.sort(…) | Sort table rows by a column value. |
tables.setAltText | editor.doc.tables.setAltText(…) | Set the alternative text description for a table. |
tables.setStyle | editor.doc.tables.setStyle(…) | Apply a named table style to the target table. |
tables.clearStyle | editor.doc.tables.clearStyle(…) | Remove the applied table style, reverting to defaults. |
tables.setStyleOption | editor.doc.tables.setStyleOption(…) | Toggle a conditional style option such as banded rows or first column. |
tables.setBorder | editor.doc.tables.setBorder(…) | Set border properties on a table or cell range. |
tables.clearBorder | editor.doc.tables.clearBorder(…) | Remove border formatting from a table or cell range. |
tables.applyBorderPreset | editor.doc.tables.applyBorderPreset(…) | Apply a border preset (e.g. all borders, outside only) to a table. |
tables.setShading | editor.doc.tables.setShading(…) | Set the background shading color on a table or cell range. |
tables.clearShading | editor.doc.tables.clearShading(…) | Remove shading from a table or cell range. |
tables.setTablePadding | editor.doc.tables.setTablePadding(…) | Set default cell padding for the entire table. |
tables.setCellPadding | editor.doc.tables.setCellPadding(…) | Set padding on a specific table cell or cell range. |
tables.setCellSpacing | editor.doc.tables.setCellSpacing(…) | Set the cell spacing for the target table. |
tables.clearCellSpacing | editor.doc.tables.clearCellSpacing(…) | Remove custom cell spacing from the target table. |
tables.get | editor.doc.tables.get(…) | Retrieve table structure and dimensions by locator. |
tables.getCells | editor.doc.tables.getCells(…) | Retrieve cell information for a table, optionally filtered by row or column. |
tables.getProperties | editor.doc.tables.getProperties(…) | Retrieve layout and style properties of a table. |
tables.getStyles | editor.doc.tables.getStyles(…) | List all table styles and the document-level default table style setting. |
tables.setDefaultStyle | editor.doc.tables.setDefaultStyle(…) | Set the document-level default table style (w:defaultTableStyle in settings.xml). |
tables.clearDefaultStyle | editor.doc.tables.clearDefaultStyle(…) | Remove the document-level default table style setting. |
History
| Operation | API member path | Description |
|---|---|---|
history.get | editor.doc.history.get(…) | Query the current undo/redo history state of the active editor. |
history.undo | editor.doc.history.undo(…) | Undo the most recent history-safe mutation in the active editor. |
history.redo | editor.doc.history.redo(…) | Redo the most recently undone action in the active editor. |
Table of Contents
| Operation | API member path | Description |
|---|---|---|
toc.list | editor.doc.toc.list(…) | List all tables of contents in the document. |
toc.get | editor.doc.toc.get(…) | Retrieve details of a specific table of contents. |
toc.configure | editor.doc.toc.configure(…) | Update the configuration switches of a table of contents. |
toc.update | editor.doc.toc.update(…) | Rebuild or refresh the materialized content of a table of contents. |
toc.remove | editor.doc.toc.remove(…) | Remove a table of contents from the document. |
toc.markEntry | editor.doc.toc.markEntry(…) | Insert a TC (table of contents entry) field at the target paragraph. |
toc.unmarkEntry | editor.doc.toc.unmarkEntry(…) | Remove a TC (table of contents entry) field from the document. |
toc.listEntries | editor.doc.toc.listEntries(…) | List all TC (table of contents entry) fields in the document body. |
toc.getEntry | editor.doc.toc.getEntry(…) | Retrieve details of a specific TC (table of contents entry) field. |
toc.editEntry | editor.doc.toc.editEntry(…) | Update the properties of a TC (table of contents entry) field. |
Images
| Operation | API member path | Description |
|---|---|---|
images.list | editor.doc.images.list(…) | List all images in the document. |
images.get | editor.doc.images.get(…) | Get details for a specific image by its stable ID. |
images.delete | editor.doc.images.delete(…) | Delete an image from the document. |
images.move | editor.doc.images.move(…) | Move an image to a new location in the document. |
images.convertToInline | editor.doc.images.convertToInline(…) | Convert a floating image to inline placement. |
images.convertToFloating | editor.doc.images.convertToFloating(…) | Convert an inline image to floating placement. |
images.setSize | editor.doc.images.setSize(…) | Set explicit width/height for an image. |
images.setWrapType | editor.doc.images.setWrapType(…) | Set the text wrapping type for a floating image. |
images.setWrapSide | editor.doc.images.setWrapSide(…) | Set which side(s) text wraps around a floating image. |
images.setWrapDistances | editor.doc.images.setWrapDistances(…) | Set the text-wrap distance margins for a floating image. |
images.setPosition | editor.doc.images.setPosition(…) | Set the anchor position for a floating image. |
images.setAnchorOptions | editor.doc.images.setAnchorOptions(…) | Set anchor behavior options for a floating image. |
images.setZOrder | editor.doc.images.setZOrder(…) | Set the z-order (relativeHeight) for a floating image. |
images.scale | editor.doc.images.scale(…) | Scale an image by a uniform factor applied to both dimensions. |
images.setLockAspectRatio | editor.doc.images.setLockAspectRatio(…) | Lock or unlock the aspect ratio for an image. |
images.rotate | editor.doc.images.rotate(…) | Set the absolute rotation angle for an image. |
images.flip | editor.doc.images.flip(…) | Set horizontal and/or vertical flip state for an image. |
images.crop | editor.doc.images.crop(…) | Apply rectangular edge-percentage crop to an image. |
images.resetCrop | editor.doc.images.resetCrop(…) | Remove all cropping from an image. |
images.replaceSource | editor.doc.images.replaceSource(…) | Replace the image source while preserving identity and placement. |
images.setAltText | editor.doc.images.setAltText(…) | Set the accessibility description (alt text) for an image. |
images.setDecorative | editor.doc.images.setDecorative(…) | Mark or unmark an image as decorative. |
images.setName | editor.doc.images.setName(…) | Set the object name for an image. |
images.setHyperlink | editor.doc.images.setHyperlink(…) | Set or remove the hyperlink attached to an image. |
images.insertCaption | editor.doc.images.insertCaption(…) | Insert a caption paragraph below the image. |
images.updateCaption | editor.doc.images.updateCaption(…) | Update the text of an existing caption paragraph. |
images.removeCaption | editor.doc.images.removeCaption(…) | Remove the caption paragraph from below the image. |
Hyperlinks
| Operation | API member path | Description |
|---|---|---|
hyperlinks.list | editor.doc.hyperlinks.list(…) | List all hyperlinks in the document, with optional filtering by href, anchor, or display text. |
hyperlinks.get | editor.doc.hyperlinks.get(…) | Retrieve details of a specific hyperlink by its inline address. |
hyperlinks.wrap | editor.doc.hyperlinks.wrap(…) | Wrap an existing text range with a hyperlink. |
hyperlinks.insert | editor.doc.hyperlinks.insert(…) | Insert new linked text at a target position. |
hyperlinks.patch | editor.doc.hyperlinks.patch(…) | Update hyperlink metadata (destination, tooltip, target, rel) without changing display text. |
hyperlinks.remove | editor.doc.hyperlinks.remove(…) | Remove a hyperlink. Mode ‘unwrap’ preserves display text; ‘deleteText’ removes the linked content entirely. |
Headers & Footers
| Operation | API member path | Description |
|---|---|---|
headerFooters.list | editor.doc.headerFooters.list(…) | List header/footer slot entries across sections. |
headerFooters.get | editor.doc.headerFooters.get(…) | Get a single header/footer slot entry by address. |
headerFooters.resolve | editor.doc.headerFooters.resolve(…) | Resolve the effective header/footer reference for a slot, walking the section inheritance chain. |
headerFooters.refs.set | editor.doc.headerFooters.refs.set(…) | Set an explicit header/footer reference on a section slot. |
headerFooters.refs.clear | editor.doc.headerFooters.refs.clear(…) | Clear an explicit header/footer reference from a section slot. |
headerFooters.refs.setLinkedToPrevious | editor.doc.headerFooters.refs.setLinkedToPrevious(…) | Link or unlink a header/footer slot to/from the previous section. |
headerFooters.parts.list | editor.doc.headerFooters.parts.list(…) | List unique header/footer part records from document relationships. |
headerFooters.parts.create | editor.doc.headerFooters.parts.create(…) | Create a new independent header/footer part, optionally cloned from an existing part. |
headerFooters.parts.delete | editor.doc.headerFooters.parts.delete(…) | Delete a header/footer part and its associated relationship when no section slots reference it. |
Content Controls
| Operation | API member path | Description |
|---|---|---|
create.contentControl | editor.doc.create.contentControl(…) | Create a new content control (SDT) in the document. |
contentControls.list | editor.doc.contentControls.list(…) | List all content controls in the document with optional type/tag filtering. |
contentControls.get | editor.doc.contentControls.get(…) | Retrieve a single content control by target. |
contentControls.listInRange | editor.doc.contentControls.listInRange(…) | List content controls within a block range. |
contentControls.selectByTag | editor.doc.contentControls.selectByTag(…) | Select content controls matching a specific tag value. |
contentControls.selectByTitle | editor.doc.contentControls.selectByTitle(…) | Select content controls matching a specific title (alias) value. |
contentControls.listChildren | editor.doc.contentControls.listChildren(…) | List direct child content controls nested inside the target. |
contentControls.getParent | editor.doc.contentControls.getParent(…) | Get the parent content control of the target, if any. |
contentControls.wrap | editor.doc.contentControls.wrap(…) | Wrap existing content with a new content control. |
contentControls.unwrap | editor.doc.contentControls.unwrap(…) | Remove the content control wrapper, preserving its content in place. |
contentControls.delete | editor.doc.contentControls.delete(…) | Delete a content control and its content from the document. |
contentControls.copy | editor.doc.contentControls.copy(…) | Copy a content control to a destination position. Copied SDTs receive new IDs. |
contentControls.move | editor.doc.contentControls.move(…) | Move a content control to a new position. Preserves original IDs. |
contentControls.patch | editor.doc.contentControls.patch(…) | Patch metadata properties on a content control (tag, alias, appearance, color, etc.). |
contentControls.setLockMode | editor.doc.contentControls.setLockMode(…) | Set the lock mode on a content control. |
contentControls.setType | editor.doc.contentControls.setType(…) | Transition a content control to a different semantic type. Metadata-only; no implicit content rewrite. |
contentControls.getContent | editor.doc.contentControls.getContent(…) | Get the text content of a content control. |
contentControls.replaceContent | editor.doc.contentControls.replaceContent(…) | Replace the entire content of a content control. |
contentControls.clearContent | editor.doc.contentControls.clearContent(…) | Clear all content inside a content control, leaving it empty. |
contentControls.appendContent | editor.doc.contentControls.appendContent(…) | Append content to the end of a content control. |
contentControls.prependContent | editor.doc.contentControls.prependContent(…) | Prepend content to the beginning of a content control. |
contentControls.insertBefore | editor.doc.contentControls.insertBefore(…) | Insert content immediately before a content control. |
contentControls.insertAfter | editor.doc.contentControls.insertAfter(…) | Insert content immediately after a content control. |
contentControls.getBinding | editor.doc.contentControls.getBinding(…) | Get the data binding metadata (w:dataBinding) of a content control. |
contentControls.setBinding | editor.doc.contentControls.setBinding(…) | Set data binding metadata on a content control. |
contentControls.clearBinding | editor.doc.contentControls.clearBinding(…) | Remove data binding metadata from a content control. |
contentControls.getRawProperties | editor.doc.contentControls.getRawProperties(…) | Get the raw sdtPr properties of a content control as a passthrough hash. |
contentControls.patchRawProperties | editor.doc.contentControls.patchRawProperties(…) | Apply raw XML-level patches to the sdtPr subtree of a content control. |
contentControls.validateWordCompatibility | editor.doc.contentControls.validateWordCompatibility(…) | Validate a content control for Word compatibility issues. |
contentControls.normalizeWordCompatibility | editor.doc.contentControls.normalizeWordCompatibility(…) | Normalize a content control to resolve Word compatibility issues. |
contentControls.normalizeTagPayload | editor.doc.contentControls.normalizeTagPayload(…) | Normalize a content control tag between plain-string and JSON-encoded formats. |
contentControls.text.setMultiline | editor.doc.contentControls.text.setMultiline(…) | Set or clear the multiline attribute on a plain-text content control. |
contentControls.text.setValue | editor.doc.contentControls.text.setValue(…) | Set the text value of a plain-text content control. |
contentControls.text.clearValue | editor.doc.contentControls.text.clearValue(…) | Clear the text value of a plain-text content control. |
contentControls.date.setValue | editor.doc.contentControls.date.setValue(…) | Set the date value of a date content control. |
contentControls.date.clearValue | editor.doc.contentControls.date.clearValue(…) | Clear the date value of a date content control. |
contentControls.date.setDisplayFormat | editor.doc.contentControls.date.setDisplayFormat(…) | Set the display format string for a date content control. |
contentControls.date.setDisplayLocale | editor.doc.contentControls.date.setDisplayLocale(…) | Set the display locale for a date content control. |
contentControls.date.setStorageFormat | editor.doc.contentControls.date.setStorageFormat(…) | Set the XML storage format for a date content control. |
contentControls.date.setCalendar | editor.doc.contentControls.date.setCalendar(…) | Set the calendar type for a date content control. |
contentControls.checkbox.getState | editor.doc.contentControls.checkbox.getState(…) | Get the checked state of a checkbox content control. |
contentControls.checkbox.setState | editor.doc.contentControls.checkbox.setState(…) | Set the checked state of a checkbox content control. |
contentControls.checkbox.toggle | editor.doc.contentControls.checkbox.toggle(…) | Toggle the checked state of a checkbox content control. |
contentControls.checkbox.setSymbolPair | editor.doc.contentControls.checkbox.setSymbolPair(…) | Set the checked and unchecked symbol glyphs for a checkbox content control. |
contentControls.choiceList.getItems | editor.doc.contentControls.choiceList.getItems(…) | Get the list items and selected value of a comboBox or dropDownList content control. |
contentControls.choiceList.setItems | editor.doc.contentControls.choiceList.setItems(…) | Replace the list items of a comboBox or dropDownList content control. |
contentControls.choiceList.setSelected | editor.doc.contentControls.choiceList.setSelected(…) | Set the selected value of a comboBox or dropDownList content control. |
contentControls.repeatingSection.listItems | editor.doc.contentControls.repeatingSection.listItems(…) | List the repeating section items inside a repeating section content control. |
contentControls.repeatingSection.insertItemBefore | editor.doc.contentControls.repeatingSection.insertItemBefore(…) | Insert a new item before a specific index in a repeating section. |
contentControls.repeatingSection.insertItemAfter | editor.doc.contentControls.repeatingSection.insertItemAfter(…) | Insert a new item after a specific index in a repeating section. |
contentControls.repeatingSection.cloneItem | editor.doc.contentControls.repeatingSection.cloneItem(…) | Clone a repeating section item at the given index. Cloned SDTs receive new IDs. |
contentControls.repeatingSection.deleteItem | editor.doc.contentControls.repeatingSection.deleteItem(…) | Delete a repeating section item at the given index. |
contentControls.repeatingSection.setAllowInsertDelete | editor.doc.contentControls.repeatingSection.setAllowInsertDelete(…) | Set the allowInsertDelete flag on a repeating section. |
contentControls.group.wrap | editor.doc.contentControls.group.wrap(…) | Wrap a content control inside a new group content control. Always nests; not idempotent. |
contentControls.group.ungroup | editor.doc.contentControls.group.ungroup(…) | Remove the group designation from a group content control. |
Bookmarks
| Operation | API member path | Description |
|---|---|---|
bookmarks.list | editor.doc.bookmarks.list(…) | List all bookmarks in the document. |
bookmarks.get | editor.doc.bookmarks.get(…) | Get detailed information about a specific bookmark. |
bookmarks.insert | editor.doc.bookmarks.insert(…) | Insert a new named bookmark at a target location. |
bookmarks.rename | editor.doc.bookmarks.rename(…) | Rename an existing bookmark. |
bookmarks.remove | editor.doc.bookmarks.remove(…) | Remove a bookmark from the document. |
Footnotes
| Operation | API member path | Description |
|---|---|---|
footnotes.list | editor.doc.footnotes.list(…) | List all footnotes and endnotes in the document. |
footnotes.get | editor.doc.footnotes.get(…) | Get detailed information about a specific footnote or endnote. |
footnotes.insert | editor.doc.footnotes.insert(…) | Insert a new footnote or endnote at a target location. |
footnotes.update | editor.doc.footnotes.update(…) | Update the content of an existing footnote or endnote. |
footnotes.remove | editor.doc.footnotes.remove(…) | Remove a footnote or endnote from the document. |
footnotes.configure | editor.doc.footnotes.configure(…) | Configure numbering and placement for footnotes or endnotes. |
Cross-References
| Operation | API member path | Description |
|---|---|---|
crossRefs.list | editor.doc.crossRefs.list(…) | List all cross-reference fields in the document. |
crossRefs.get | editor.doc.crossRefs.get(…) | Get detailed information about a specific cross-reference field. |
crossRefs.insert | editor.doc.crossRefs.insert(…) | Insert a new cross-reference field at a target location. |
crossRefs.rebuild | editor.doc.crossRefs.rebuild(…) | Rebuild (recalculate) a cross-reference field. |
crossRefs.remove | editor.doc.crossRefs.remove(…) | Remove a cross-reference field from the document. |
Index
| Operation | API member path | Description |
|---|---|---|
index.list | editor.doc.index.list(…) | List all index blocks in the document. |
index.get | editor.doc.index.get(…) | Get detailed information about a specific index block. |
index.insert | editor.doc.index.insert(…) | Insert a new index block at a target location. |
index.configure | editor.doc.index.configure(…) | Update the configuration of an existing index block. |
index.rebuild | editor.doc.index.rebuild(…) | Rebuild (regenerate) an index block from its entries. |
index.remove | editor.doc.index.remove(…) | Remove an index block from the document. |
index.entries.list | editor.doc.index.entries.list(…) | List all XE (index entry) fields in the document. |
index.entries.get | editor.doc.index.entries.get(…) | Get detailed information about a specific XE index entry. |
index.entries.insert | editor.doc.index.entries.insert(…) | Insert a new XE index entry field at a target location. |
index.entries.update | editor.doc.index.entries.update(…) | Update the properties of an existing XE index entry. |
index.entries.remove | editor.doc.index.entries.remove(…) | Remove an XE index entry field from the document. |
Captions
| Operation | API member path | Description |
|---|---|---|
captions.list | editor.doc.captions.list(…) | List all caption paragraphs in the document. |
captions.get | editor.doc.captions.get(…) | Get detailed information about a specific caption paragraph. |
captions.insert | editor.doc.captions.insert(…) | Insert a new caption paragraph adjacent to a target block. |
captions.update | editor.doc.captions.update(…) | Update the text of an existing caption paragraph. |
captions.remove | editor.doc.captions.remove(…) | Remove a caption paragraph from the document. |
captions.configure | editor.doc.captions.configure(…) | Configure numbering format for a caption label. |
Fields
| Operation | API member path | Description |
|---|---|---|
fields.list | editor.doc.fields.list(…) | List all fields in the document. |
fields.get | editor.doc.fields.get(…) | Get detailed information about a specific field. |
fields.insert | editor.doc.fields.insert(…) | Insert a raw field code at a target location. |
fields.rebuild | editor.doc.fields.rebuild(…) | Rebuild (recalculate) a field. |
fields.remove | editor.doc.fields.remove(…) | Remove a field from the document. |
Citations
| Operation | API member path | Description |
|---|---|---|
citations.list | editor.doc.citations.list(…) | List all citation marks in the document. |
citations.get | editor.doc.citations.get(…) | Get detailed information about a specific citation mark. |
citations.insert | editor.doc.citations.insert(…) | Insert a new citation mark at a target location. |
citations.update | editor.doc.citations.update(…) | Update an existing citation mark’s source references. |
citations.remove | editor.doc.citations.remove(…) | Remove a citation mark from the document. |
citations.sources.list | editor.doc.citations.sources.list(…) | List all citation sources in the document store. |
citations.sources.get | editor.doc.citations.sources.get(…) | Get detailed information about a specific citation source. |
citations.sources.insert | editor.doc.citations.sources.insert(…) | Register a new citation source in the document store. |
citations.sources.update | editor.doc.citations.sources.update(…) | Update the fields of an existing citation source. |
citations.sources.remove | editor.doc.citations.sources.remove(…) | Remove a citation source from the document store. |
citations.bibliography.get | editor.doc.citations.bibliography.get(…) | Get information about the bibliography block. |
citations.bibliography.insert | editor.doc.citations.bibliography.insert(…) | Insert a bibliography block at a target location. |
citations.bibliography.rebuild | editor.doc.citations.bibliography.rebuild(…) | Rebuild the bibliography from current sources. |
citations.bibliography.configure | editor.doc.citations.bibliography.configure(…) | Configure the bibliography style. |
citations.bibliography.remove | editor.doc.citations.bibliography.remove(…) | Remove the bibliography block from the document. |
Table of Authorities
| Operation | API member path | Description |
|---|---|---|
authorities.list | editor.doc.authorities.list(…) | List all table-of-authorities blocks in the document. |
authorities.get | editor.doc.authorities.get(…) | Get detailed information about a specific table-of-authorities block. |
authorities.insert | editor.doc.authorities.insert(…) | Insert a new table-of-authorities block at a target location. |
authorities.configure | editor.doc.authorities.configure(…) | Update the configuration of an existing table-of-authorities block. |
authorities.rebuild | editor.doc.authorities.rebuild(…) | Rebuild a table-of-authorities block from its entries. |
authorities.remove | editor.doc.authorities.remove(…) | Remove a table-of-authorities block from the document. |
authorities.entries.list | editor.doc.authorities.entries.list(…) | List all TA (authority entry) fields in the document. |
authorities.entries.get | editor.doc.authorities.entries.get(…) | Get detailed information about a specific TA authority entry. |
authorities.entries.insert | editor.doc.authorities.entries.insert(…) | Insert a new TA authority entry field at a target location. |
authorities.entries.update | editor.doc.authorities.entries.update(…) | Update the properties of an existing TA authority entry. |
authorities.entries.remove | editor.doc.authorities.entries.remove(…) | Remove a TA authority entry field from the document. |

