Skip to main content

ContentControl

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

ContentControl properties

clear()

delete()

getComments()

getContentControls()

getHtml()

As Word: tables as <table> (merges as colspan/rowspan), <h1>-<h6> for headings, list markers as text, b/i/u/s/sup/sub and links inline.

getOoxml()

getRange()

getReviewedText()

getTextRanges()

getTrackedChanges()

insertBreak()

insertContentControl()

Nest a control around this one’s content; the id is fresh for the story.

insertFileFromBase64()

Insert a .docx’s body at the edge (or in place of the content), with its images, links, styles, numbering, notes and comments. Async here: unlike Word, the file is unpacked on this side.

insertOoxml()

A WML fragment or pkg:package inside the control: at its content’s edge or in its place.

insertParagraph()

insertTable()

insertText()

set()

split()

Office.js ContentControl.split: the control’s text cut after each delimiter. Not implemented. These Office.js members throw: onDataChanged, onDeleted, onEntered, onExited, onSelectionChanged, insertHtml, insertInlinePictureFromBase64, select.