Skip to main content

CheckboxContentControl

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

CheckboxContentControl properties

CheckboxContentControl.set()

ContentControlCollection

OfficeJS-flavored live collection: items is recomputed on every access. Import from @reductoai/docx/node, @reductoai/docx/officejs.

ContentControlCollection properties

ContentControlCollection.at()

ContentControlCollection.getByChangeTrackingStates()

ContentControlCollection.getById()

ContentControlCollection.getByIdOrNullObject()

ContentControlCollection.getByTag()

ContentControlCollection.getByTitle()

ContentControlCollection.getByTypes()

ContentControlCollection.getFirst()

ContentControlCollection.getFirstOrNullObject()

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

ContentControlCollection.getItem()

OfficeJS spelling of at().

ContentControlCollection.getLast()

ContentControlCollection.getLastOrNullObject()

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

ContentControlListItem

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

ContentControlListItem properties

ContentControlListItem.delete()

ContentControlListItem.select()

ContentControlListItem.set()

ContentControlsModel

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

ContentControlsModel properties

ContentControlsModel.clearHover()

ContentControlsModel.clickAt()

A click on a check box glyph flips it, as in Word, and the caret stays where it was; a click on a dropdown opens its list.

ContentControlsModel.holdsCaret()

The caret sits in a control, which may refuse or reshape what is typed.

ContentControlsModel.hoverAt()

Track the control under the pointer; the frame repaints only when it changes.

ContentControlsModel.observes()

ContentControlsModel.openDatePicker()

Word’s calendar under a date picker, hung from a viewport point by its left or right edge.

ContentControlsModel.openPicker()

Word’s list flyout under a dropdown: the caret enters the control, then the items show.

ContentControlsModel.paint()

The overlay pass: every control when showing all, the caret’s control on top.

ContentControlsModel.pickerItems()

The item rows of a list control; the shown item is ticked.

ContentControlsModel.stampOf()

ContentControlsModel.subscribe()

Listen to one key, or to every change (including adopted children) when key is omitted.

ContentControlsModel.toggle()

CustomXmlPart

Import from @reductoai/docx/officejs.

CustomXmlPart properties

CustomXmlPart.delete()

CustomXmlPart.deleteAttribute()

CustomXmlPart.deleteElement()

CustomXmlPart.getXml()

CustomXmlPart.insertAttribute()

CustomXmlPart.insertElement()

Insert the XML as children of each matched element, at index or last.

CustomXmlPart.loadXml()

CustomXmlPart.query()

Each match as XML: an element’s markup, an attribute’s value.

CustomXmlPart.setXml()

Replace the whole document; the part keeps its id and its bindings.

CustomXmlPart.updateAttribute()

Sets an attribute the element already carries; a missing one throws, as in Word.

CustomXmlPart.updateElement()

Not implemented. These Office.js members throw: documentElement, namespaceManager, schemaCollection, addNode, selectNodes, selectSingleNode.

CustomXmlPartCollection

OfficeJS-flavored live collection: items is recomputed on every access. Import from @reductoai/docx/officejs.

CustomXmlPartCollection properties

CustomXmlPartCollection.add()

CustomXmlPartCollection.at()

CustomXmlPartCollection.getByNamespace()

CustomXmlPartCollection.getCount()

CustomXmlPartCollection.getFirst()

CustomXmlPartCollection.getFirstOrNullObject()

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

CustomXmlPartCollection.getItem()

Lookup by ds:itemID, with or without braces; a number is the shared signed index.

CustomXmlPartCollection.getItemOrNullObject()

CustomXmlPartCollection.getLast()

CustomXmlPartCollection.getLastOrNullObject()

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

CustomXmlPartScopedCollection

OfficeJS-flavored live collection: items is recomputed on every access. Import from @reductoai/docx/officejs.

CustomXmlPartScopedCollection properties

CustomXmlPartScopedCollection.at()

CustomXmlPartScopedCollection.getCount()

CustomXmlPartScopedCollection.getFirst()

CustomXmlPartScopedCollection.getFirstOrNullObject()

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

CustomXmlPartScopedCollection.getItem()

Lookup by ds:itemID, with or without braces; a number is the shared signed index.

CustomXmlPartScopedCollection.getItemOrNullObject()

CustomXmlPartScopedCollection.getLast()

CustomXmlPartScopedCollection.getLastOrNullObject()

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

CustomXmlPartScopedCollection.getOnlyItem()

CustomXmlPartScopedCollection.getOnlyItemOrNullObject()

DatePickerContentControl

Import from @reductoai/docx/officejs.

DatePickerContentControl properties

DatePickerContentControl.formatDate()

The day as the picture shows it.

DatePickerContentControl.selectDate()

The calendar’s pick: the text shows the day through the picture and w:fullDate stores it.

DatePickerContentControl.set()

ListContentControl

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

ListContentControl properties

ListContentControl.addListItem()

ListContentControl.changed()

ListContentControl.deleteAllListItems()

XmlMapping

Import from @reductoai/docx/officejs.

XmlMapping properties

XmlMapping.delete()

Unmap the control; its content stays as it is.

XmlMapping.setMapping()

Map the control to the node xPath selects and show its value. False, and no mapping, when no part has such a node or the node holds elements rather than a value. Not implemented. These Office.js members throw: customXmlNode, setMappingByNode.