API member directory
Find every public editing API class, member group, enum, support type, and host extension.
Use this directory to find task examples and runtime limits for the public API. The generated API reference provides exact declarations, overloads, and enum values. The repository also publishes generated declarations for the root entry and browser entry.
A declaration or enum value does not guarantee runtime support for every document or argument. Read the linked guide before choosing an operation. Members marked @internal, including factories and hydration helpers, are not supported application APIs. Obtain model objects from context.document; do not construct them.
Runtime and common members
| Public symbol | Members or values | Guide |
|---|---|---|
DocxEditor, DocxEditorNamespace | createServer, createCollaborative; browser entry adds createBrowser | Runtime and setup |
DocxEditorRuntime, DocxEditorServerRuntime | capabilities, both run overloads, dispose; server adds save | Runtime and setup |
CreateServerOptions, CreateCollaborativeOptions, CreateBrowserOptions | Author, revision view, host-specific parsing, modules, and pagination | Runtime and setup |
DocumentCapabilities | document, save, events, selection, scrolling, layout | Runtime and setup |
DocumentLimits, DocumentZipLimits, DocumentXmlLimits, EditorModule | Input budgets and DOM-free module contributions | Runtime and setup |
ServerPaginationOptions | measurer, optional producer | Fields and pagination |
RequestContext, RunCallback | document, capabilities, trackedObjects, sync and async callback result | Batching, loading, and errors |
ClientObject | Inherited context, isNullObject, and load | Batching, loading, and errors |
ClientResult | value, isLoaded; returned by RevisionCollection.resolve() | Batching, loading, and errors |
TrackedObjects | add, remove, each accepting one object or an array | Batching, loading, and errors |
LoadOption, LoadQueryOptions | Explicit property names; select, top, skip; reserved expand | Batching, loading, and errors |
DocxEditorError, DocxEditorErrorInit, DocxEditorErrorCode, isDocxEditorError | Stable error codes, target, resource limit, and revision metadata | Batching, loading, and errors |
Document and text objects
Every model object inherits the common ClientObject members. Each collection also exposes loaded, read-only items.
| Object | Public members beyond inherited members | Guide |
|---|---|---|
Document | removeDocumentInformation, properties, body, paragraphs, sections, contentControls, comments, revisions, footnotes, endnotes, changeTrackingMode | Text and ranges, Page layout and stories, Tracked changes |
RemoveDocInfoType | All standard enum values; only documentProperties removal is supported | Remove document properties |
DocumentProperties | author, title, subject, keywords, comments, category, read-only lastAuthor | Document properties |
Body | text, footnotes, endnotes, paragraphs, getRange, search, clear, insertText, insertParagraph; font, style, lists, bookmarks, contentControls, getComments, revisions, tables, inlinePictures, shapes, fields | Text and ranges, Page layout and stories |
Paragraph | text, uniqueLocalId, getRange, insertText, insertParagraph, split, clear, delete; font, style, paragraph formatting; list, listItem, startNewList, attachToList, detachFromList; shapes | Text and ranges, Formatting and styles, Lists and numbering |
Range | text, paragraphs, search, insertText, insertParagraph, clear, delete, select; font, style, hyperlink, bookmarks, tables, inlinePictures, fields; insertTable, insertInlinePictureFromBase64, insertField, insertBreak, insertContentControl, insertComment | Text and ranges and the dedicated insertion guides |
ParagraphCollection | getFirst, getLast, getFirstOrNullObject, getLastOrNullObject | Search and navigation |
RangeCollection | getFirst, getLast, getFirstOrNullObject | Search and navigation |
Bookmark, BookmarkCollection | Bookmark name, range, select; collection items | Search and navigation |
SearchOptions, SelectionMode | Plain-text search flags and browser selection locations | Search and navigation |
InsertLocation, BesideLocation, BodyInsertParagraphLocation, BodyInsertTextLocation, ParagraphInsertTextLocation, RangeInsertTextLocation | Insertion location enums and aliases | Text and ranges |
Formatting, lists, tables, and pictures
Font writes honor inherited complex-script properties. Font reads return authored values or null; they do not resolve inherited formatting.
| Object or type | Public members beyond inherited members | Guide |
|---|---|---|
Font | bold, italic, color, name, size, underline, strikeThrough, highlightColor, subscript, superscript | Formatting and styles |
Paragraph formatting | alignment, firstLineIndent, leftIndent, rightIndent, lineSpacing, spaceBefore, spaceAfter | Formatting and styles, including right-to-left alignment |
UnderlineType, Alignment, ParagraphAlignment | Font underline and paragraph alignment values | Formatting and styles |
List | id, paragraphs, getLevelParagraphs, insertParagraph, setLevelBullet, setLevelNumbering, setLevelStartingNumber, setLevelIndents | Lists and numbering |
ListCollection, ListItem | Collection getFirst, getById; item level | Lists and numbering |
ListBullet, ListNumbering | Bullet and number marker values | Lists and numbering |
Table | values, style, headerRowCount, rowCount, columnCount, rows, getCell, addRows, addColumns, deleteRows, deleteColumns, delete | Tables and cells |
TableRow, TableCell | Row cells, insertRows; cell body, value, columnWidth, shadingColor, verticalAlignment | Tables and cells |
TableCollection, TableRowCollection, TableCellCollection | getFirst, getFirstOrNullObject | Tables and cells |
VerticalAlignment | Cell alignment values | Tables and cells |
InlinePicture | width, height, lockAspectRatio, altTextDescription, delete | Inline pictures |
InlinePictureCollection | getFirst, getLast, getFirstOrNullObject, getLastOrNullObject | Inline pictures |
Shape, ShapeCollection, ShapeType | Shape id, name, type, body; collection getFirst, getFirstOrNullObject, getByTypes; shape type values | Page layout and stories |
Fields, stories, and controls
Range.insertContentControl() creates RichText, PlainText, and DatePicker controls.
| Object or type | Public members beyond inherited members | Guide |
|---|---|---|
Field, FieldCollection | Field code, updateResult, delete; collection getFirst, getLast, getFirstOrNullObject, getLastOrNullObject | Fields and pagination |
FieldType, FieldTypeLiteral | Office.js-compatible field vocabulary; authoring supports PAGE, NUMPAGES, and the documented inert TOC subset | Fields and pagination |
Section, SectionCollection | Section body, pageSetup, getHeader, getFooter, getNext; collection getFirst | Page layout and stories |
PageSetup | pageWidth, pageHeight, orientation, topMargin, bottomMargin, leftMargin, rightMargin | Page layout and stories |
HeaderFooterType, PageOrientation, BreakType | Story variants, orientation, and break vocabulary | Page layout and stories |
NoteItem, NoteItemCollection, NoteItemType | Note type, text, body, delete, getNext; collection getFirst; note kind values | Page layout and stories |
ContentControl | id, tag, title, subtype, isBound, cannotDelete, cannotEdit, placeholderShown, temporary, text, paragraphs, contentControls, getRange, setValue, insertText, delete | Content controls |
ContentControlCollection | getFirst, getFirstOrNullObject, getById, getByTag, getByTitle | Content controls |
ContentControlType, ContentControlSubtype, ContentControlValue, ContentControlLockState | Creation vocabulary, DOCX subtype terms, typed values, and lock vocabulary | Content controls |
Comments and revisions
Document.changeTrackingMode = 'TrackMineOnly' tracks supported text, font, paragraph, list, table, and content control edits. Column changes require an eligible complete proposed table. Page setup refuses while tracking. For supported operations and collaboration limits, see Tracked changes.
| Object or type | Public members beyond inherited members | Guide |
|---|---|---|
Comment | authorName, creationDate, id, text, delete, resolved, replies, getRange, reply | Comments |
CommentReply | authorName, creationDate, id, text, delete | Comments |
CommentCollection, CommentReplyCollection | getFirst | Comments |
Revision | author, date, type, range, accept, reject | Tracked changes |
RevisionCollection | resolve, acceptAll, rejectAll | Tracked changes |
ChangeTrackingMode, RevisionTextView, RevisionType | Runtime tracking modes, read views, and published revision types | Tracked changes |
Distinguish host extensions from Office.js compatibility
Host factories, runtime capabilities, input budgets, and collaboration setup are DocxEditor infrastructure. They do not represent Microsoft Office add-in APIs. Body-scoped bookmarks and revisions, document notes, typed control values, and nullable review dates include documented differences.
External document refresh
The refresh controller belongs to the browser host, outside the Office.js document model. RefreshHighlightOptions controls change selection and decoration. NavigateToChangeOptions controls scroll alignment, motion, padding, and focus. For more information, see Document refresh API.
RefreshChangeInput.description supplies a processor review summary. RefreshChange.diagnostic reports unavailable locations with stable codes and the requested anchor. Refresh resets selection and undo history. It refuses collaborative sessions.
Document properties
Document.properties returns a DocumentProperties proxy. It exposes the string properties author, title, subject, keywords, comments, and category. Load each property before reading it. Assignments commit at context.sync(). Missing properties read as empty strings. An empty assignment clears that value.
Writes preserve unrelated document properties. Values must contain XML-safe text with at most 4096 UTF-16 code units. TrackMineOnly refuses these writes with NotSupported. Individual dates and custom properties are unsupported. lastAuthor reads cp:lastModifiedBy and has no setter.
await runtime.run(async (context) => {
const properties = context.document.properties;
properties.author = 'Public Records Office';
properties.title = 'Release packet';
properties.subject = 'Public information';
properties.keywords = '';
properties.comments = '';
await context.sync();
});Collaborative writes require an existing core-properties part. If the input omits this part, set properties before joining collaboration. Concurrent creation of this package part cannot merge safely.
Remove document properties
Call document.removeDocumentInformation('DocumentProperties') to remove standard core, extended, and custom property parts. Keep this command as the only write in its sync. This also removes last-author information and property relationships. It preserves document content, comments, revisions, and media.
Ambiguous parts, incorrect roots or types, and unknown dependencies refuse with NotSupported. The method refuses all other RemoveDocInfoType modes, tracked writes, and collaboration. This subset does not anonymize text, cached field results, images, or review authors.
await runtime.run(async (context) => {
context.document.removeDocumentInformation('DocumentProperties');
await context.sync();
});Next steps
See Office.js compatibility before migrating Office.js code. The generated reference remains the declaration authority; runtime notes and tests establish supported behavior.
For integration patterns, see Connect an agent to a document.