Skip to main content

CustomProperty

One user-defined property in docProps/custom.xml. Import from @reductoai/docx/node, @reductoai/docx/officejs.

CustomProperty properties

CustomProperty.delete()

CustomProperty.set()

CustomPropertyCollection

The document’s user-defined properties; keys are matched case-insensitively. Import from @reductoai/docx/node, @reductoai/docx/officejs.

CustomPropertyCollection properties

CustomPropertyCollection.add()

Create or replace the property with this key; the part is created on demand.

CustomPropertyCollection.at()

CustomPropertyCollection.deleteAll()

CustomPropertyCollection.getCount()

OfficeJS spelling of items.length; synchronous like the rest of OfficeJS here.

CustomPropertyCollection.getFirst()

CustomPropertyCollection.getFirstOrNullObject()

OfficeJS null-object variant; inspect isNullObject before other members.

CustomPropertyCollection.getItem()

CustomPropertyCollection.getItemOrNullObject()

OfficeJS null-object variant; inspect isNullObject before other members.

CustomPropertyCollection.getLast()

CustomPropertyCollection.getLastOrNullObject()

OfficeJS null-object variant; inspect isNullObject before other members.

DocserverError

A failure of the live session. traceId finds the server’s log lines for it: the failed request’s, or the connection’s for an error on the socket. code: "version": the editor and the server are too far apart; the session stops instead of reloading. The message says which to update. Import from @reductoai/docx-editor.

DocserverError properties

DocserverError.captureStackTrace()

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.
The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}. The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace. The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

DocserverError.prepareStackTrace()

See https://v8.dev/docs/stack-trace-api#customizing-stack-traces

DocumentDefaults

Extension (Word’s “Set As Default”, VBA Font.SetAsTemplateDefault): the document’s w:docDefaults, the bottom layer every style and table style inherits. Reads are what a paragraph with no style properties shows. Import from @reductoai/docx/officejs.

DocumentDefaults properties

DocumentLayout

Explicit headless extension; geometry is intentionally not presented as an OfficeJS member. Import from @reductoai/docx/node, @reductoai/docx/officejs.

DocumentLayout.getOverlaps()

Find laid content intersecting a range or shape, excluding its own ink. This is a geometry diagnostic, not a validity rule: callers choose which kinds, intersection depths, and intentional overlaps are acceptable. Shape and header/footer range queries also report header/footer ink, flagged inHeaderFooter; a header range collides against every story on the page, body text included.

DocumentLayout.getRects()

Where a range’s text, or a floating shape’s or chart’s frame, landed. A shape or chart resolves to one rectangle per page (normally one); a paragraph resolves to one rectangle per laid line (basis: "line"). A blank paragraph reports its laid line box (zero width, real y and height), so empty spacers are still addressable geometry. A Table, TableRow, or TableCell resolves to its laid grid box per page (basis: "cellBox") — the box the borders paint on, not the text ink; measure text via getRange(“Whole”). A Section resolves to its per-page text-area box (basis: "textArea"), whose bottom edge is the true vertical budget. A paragraph that stops short of that edge with clean properties usually carries a run-level page break — read Paragraph.hasPageBreak, because page breaks never show in text. A footnote-story range resolves on its reference’s page (the note area); endnote stories carry no laid provenance yet and refuse by name.

DocumentProperties

Import from @reductoai/docx/node, @reductoai/docx/officejs.

DocumentProperties properties

DocumentProperties.set()

EditMemory

Not exported by name. You get it from the API.

EditMemory properties

EditMemory.goBack()

The next older edit spot on each press, wrapping round after the oldest.

EditMemory.moved()

EditMemory.ran()

Word’s Repeat takes the last action: the typing since a caret move or the last word’s space, a run of deletes, or a format. Anything else, Undo, Redo and an AutoCorrect step leave nothing to repeat.

EditMemory.repeated()

A Repeat stands alone: typing after it starts a new run.