Accepts every revision, or one author's.
Optionaloptions: { author?: string }Accepts the revisions in the selection.
Selects a picture control (the selected one when none is named) and emits pictureControlActivated, in any mode.
Optionaloptions: { element?: ElementId }Makes the selection a range everyone (or editor) may edit while the document is protected.
Optionaloptions: { editor?: string }Adds a tab stop at 0 to 1584, replacing one at the same position. Left aligned with no leader by default.
Adjust List Indents: the selection's list level's indents and what follows its number, for its whole list.
Aligns or distributes the selected floating objects across their page, its margins, or the box around them (the default for two or more; else the margins).
Applies a character style to the selected text (a linked paragraph style's character half), or removes it (null).
Applies a list gallery entry (lists.galleries): a library or recent entry defines the selection's list, or makes
a new one; a document list or list style continues that list.
Moves the floating object in the paint order, or behind or in front of the text.
Fits the columns to their contents or the window, or fixes their widths.
Changes the case of the selection (Shift+F3 cycles).
Replaces the selected picture's image, keeping its width, effects and place; its height follows the new image.
Clears character formatting (Ctrl+Space).
Clears the paragraphs' own and inherited tab stops.
Returns to the body (Esc).
Dismisses the popover asked for (popoverClosed), for an application that closes its own on Esc or a press elsewhere; with none open, nothing. View.
Back to the template from a sub-template, at the template's selection from before. View.
Continues the previous list from this paragraph.
Turns every footnote into an endnote, every endnote into a footnote, or both ('swap').
Converts the selected rows, or the whole table, to text: a paragraph for each row, its cells joined by the separator (character with 'other').
Converts the selected paragraphs to a table: a row for each paragraph, split into cells at the separator (character with 'other'); columns (1-63) by default the most pieces a paragraph has.
Copies the selection to the clipboard; also when read only.
Holds the selection's formatting for Commands.pasteFormatting (Ctrl+Shift+C).
A new sub-template, empty, with a DOCX's body, or a copy of the sub-template copyOf in the same category
(category: default the first rule's).
Cuts the selection to the clipboard.
Decreases the left indent (Ctrl+Shift+M).
Deletes a bookmark (compared without case), keeping its text.
Deletes the selected cells, shifting the rest up or left.
Deletes the selected columns.
Deletes a reply, or the whole thread when it's the first comment.
Deletes the object.
Deletes the selected rows.
Deletes a style the document made: its paragraphs take the default paragraph style, its runs lose it, and the
styles based on it take its base. Built-in styles can't be deleted (not-allowed).
Deletes the table.
Deletes the tab stop at a position; an inherited one is cleared in the paragraph.
Says the formatting at the caret to screen readers (an announcement of kind formatting). Shift+F1.
Gives the selected columns equal widths.
Gives the selected rows equal heights.
Edits the caret page's footer, creating it when the page has none.
Edits the caret page's header, creating it when the page has none.
Changes the link at the selection.
Edits a sub-template's body in this editor, on its own pages. View.
Leaves a header or footer, a text box, or object selection (Esc).
Fills a content control with exactly one of text, an image (fitted to its box), DOCX content, or a building block
gallery's entry (its buildingBlocks).
Fills in a legacy form field (default: the one at the selection): a text field's text, a check box's state, a drop-down's entry.
Returns to an earlier edit location (Shift+F5).
Selects a bookmark's text, or puts the caret at it when it holds none (Go To); '_top' is the document's start.
Moves the caret to a page, from 1.
Groups the selected floating objects: two or more, in one story. The group is selected.
Grows the font to the next standard size (Ctrl+Shift+>).
Increases the left indent (Ctrl+M).
Inserts a tab to a place set from the margin or the indent, not from the tab stops (Insert Alignment Tab).
Bookmarks the selection: the name starts with a letter (or _, for a hidden bookmark) and holds letters, digits
and _, 40 at most. A bookmark of the same name (compared without case) moves here.
Inserts a column break (Ctrl+Shift+Enter); in the body, not in a table.
Inserts columns left or right, 1 by default.
Inserts a content control, optionally around the selection.
Optionalbinding?: DataBindingOptionalfloat?: {Floats a picture control, positioned and wrapped as setObjectWrap and setObjectPosition place an object;
wrap can't be inline.
Optionallock?: "none" | "control" | "content" | "both"Optionaloptions?: ControlOptionsOptionalplaceholder?: stringOptionalplaceholderImage?: PlaceholderImageA picture control's placeholder picture (PNG, JPEG, GIF, BMP or SVG): what the editor, the saved DOCX and a
PDF show until it is filled. An SVG is drawn with the picture's box as its viewport, so one with percentage
geometry and no viewBox adapts to every size. Default: the engine's.
Optionaltag?: stringOptionaltitle?: stringOptionalwrapSelection?: booleanInserts an endnote.
Inserts a footnote.
Inserts a legacy form field (FORMTEXT, FORMCHECKBOX, FORMDROPDOWN) at the selection.
Inserts a link; text replaces the selection (default: the selection, or the address).
Inserts a line break (Shift+Enter).
Inserts a footnote or an endnote at the caret, numbered or with its own mark (1 to 10 characters).
Inserts a page break (Ctrl+Enter); in the body, not in a table.
Inserts a page number at the caret, or in the header or footer.
Starts a new paragraph (Enter).
Inserts a picture (PNG, JPEG, GIF, BMP, TIFF, JPEG XR, SVG, EMF or WMF).
Inserts rows above or below, 1 by default.
Inserts a section break; in the body, not in a table.
Inserts a floating shape at the caret's paragraph, in front of the text, with the theme's default style, and selects it.
Inserts one character, optionally in a symbol font.
Inserts a tab character. Typing.
Inserts a table of 1 to 32767 rows and 1 to 63 columns.
Inserts text at the selection, replacing it. Typing.
Inserts a text box.
Draws wavy marks with a tooltip on elements. View.
Merges a rectangular block of cells.
Moves a section text column's boundary.
Moves the selected rows up or down (Alt+Shift+Up, Down).
Moves or extends the selection.
Moves a column boundary of the caret's row.
Moves a row boundary of the caret's table.
Moves the tab stop at from (within 0.5 pt).
Moves to the next or previous cell; next from the last cell adds a row (one step).
Reverts the correction just made, as revertAutoCorrect does, and never makes it again (adds it to autoCorrect.never).
Pastes from the system clipboard, formatted (the default) or as text. Fails not-allowed where the browser denies reading it.
Optionaloptions: { as?: "text" | "formatted" }Applies the held formatting to the selection (Ctrl+Shift+V).
Pastes the given text.
Redoes the last undone step.
Rejects every revision, or one author's.
Optionaloptions: { author?: string }Rejects the revisions in the selection.
Removes a content control, optionally keeping its content.
Removes a custom XML data part.
Removes the editable ranges at the selection.
Removes the frame the selection is in: its paragraphs go back in the text, before the paragraph it was anchored to.
Empties the caret section's header or footer (its own, so a linked one stops linking).
Removes the link at the selection, keeping its text.
Removes a sub-template; its references no longer resolve.
Removes the document's watermark.
Renames a sub-template, and with updateReferences every reference to it.
Repeats the last edit (F4).
The template's body becomes the DOCX from's body, on its last section's page; its sub-templates, custom XML
data parts, settings, styles, headers and footers stay. Closes a sub-template being edited first.
Rewrites a font family's name in the document itself, so the saved file names to: one undo step. In document
scope with no style filter it rewrites the text (runs, paragraph marks, symbols) and the tables below it (styles,
document defaults, numbering levels, the theme's font slots and the font table). In selection scope, or with a
filter, it rewrites only the text, and a matching run whose family comes from a style or the theme gets to as
its own. With tracked changes on, the text's changes are formatting revisions. Text inside locked content
controls is skipped and counted.
Replaces text in element codes, tags or titles: case-sensitive, every occurrence.
Resets the object to its original size.
Resolves or reopens a thread.
Restarts the list at this paragraph, at its level's start.
Puts back what was typed in place of the correction just made: undoes it when it is the last step, else one undo step.
Selects the whole story.
Selects the next or previous child of the selected group. View.
Selects the next or previous floating object.
Selects the next or previous revision.
Sets the alignment (Ctrl+L, E, R, J).
Sets all caps (Ctrl+Shift+A).
Sets the alternative text, or marks the object decorative.
Locks a floating object's anchor.
The application's own field types (a code's first word, compared without case), replacing those set before:
their fields keep their results, show their labels in design mode (Commands.setFieldLabels, else
«first argument»), are listed by fieldsUpdateRequested and are never read as bookmark references
("Error! Bookmark not defined."). [] clears them. Set it after each open, as the rules, or once in the
session options. View.
Sets the colour an author's changes are marked with. View.
Sets what typing corrects: the rules given switch, the lists given replace the shipped ones. A session setting: no undo.
Turns automatic hyphenation on or off, with the hyphenation patterns of the text's language.
Sets bold (Ctrl+B).
Sets the cells' vertical alignment.
Sets the cell borders on some edges, or the cells' diagonals; 'none' removes them all, diagonals too.
Sets the cells' preferred width (points 0 to 1584, or percent of the table 0 to 100), text direction, wrapping,
fitting and end mark height (hideMark); unset fields keep their value.
Sets or removes (null) the cell shading.
Sets emboss, engrave, outline and shadow; what isn't given is kept.
Raises (positive) or lowers the text, -1584 to 1584.
Sets the character spacing, -1584 to 1584.
Checks or unchecks a checkbox control.
Sets the text columns: 1 to 45, with spacing and a separator line.
Optionalseparator?: booleanOptionalspacing?: numberOptionalwidths?: ColumnWidth[]Columns of their own widths (count of them), each with the space after it; equal columns when not given.
Sets the column width, 1 to 1584.
Sets the most consecutive lines that may end in a hyphen, 0 to 32767; 0 for no limit.
Changes a content control; a null binding removes it. placeholderImage replaces a picture control's
placeholder picture while it shows it (else it rejects with unavailable).
Optionalappearance?: "hidden" | "boundingBox" | "tags"How it shows its edges.
Optionalbinding?: DataBinding | nullOptionalcolor?: `#${string}` | "none"Its colour, or the default ('none').
Optionallock?: "none" | "control" | "content" | "both"Optionaloptions?: ControlOptionsOptionalplaceholder?: stringOptionalplaceholderImage?: PlaceholderImageOptionalstyle?: StyleId | "none"The character style text typed into it takes, or none ('none').
Optionaltag?: stringOptionaltemporary?: booleanIt goes when its content is edited, leaving the content.
Optionaltitle?: stringSets the table style new tables take (Set as Default), or Table Grid (null).
Sets the document's default tab spacing, 1 to 1584.
Sets a different first page header and footer.
Sets different odd and even page headers and footers.
Sets the document's default formatting (Manage Styles' Set Defaults); what isn't given is kept.
Sets the document's properties; unset fields keep their value, an empty text removes one, and custom replaces
the custom properties.
Restrict Editing: what the document allows, and starting or stopping its enforcement. Starting takes the password
stopping will need (none when absent); stopping a password-protected document needs it. With filling in forms,
unprotectedSections are the sections (by index) anyone may edit; it can't change while enforced.
Sets a document variable (read by DOCVARIABLE), or removes it when value is absent.
Sets double strikethrough.
The selection's paragraph's drop cap: its first letter dropped into the text or in the margin, or put back ('none').
What design mode shows for each field code. View.
Locks or unlocks fields (Ctrl+F11, Ctrl+Shift+F11).
The document's file name, with its folder when FILENAME \p should show one: what FILENAME shows. Not saved, and
not an edit.
Sets the font family (non-empty).
Sets the font colour.
Sets the font size, 1 to 1638 in 0.5 steps.
Sets a legacy form field's options (default: the one at the selection); only its own kind's options apply.
Shades legacy form fields, or not.
Sets the properties of the frame the selection is in (unavailable outside a frame).
Sets the header and footer distances; unset fields keep their value.
The caret section's header or footer takes the section before's (Link to Previous), or gets its own copy of it.
Repeats the rows as a header row.
Sets hidden text (Ctrl+Shift+H).
Hyphenates words in capitals, or not.
Sets the hyphenation zone, 0 to 1584: in documents in compatibility mode 14 and earlier, a word is hyphenated only when moving it whole would leave this gap.
Sets the indents, -1584 to 1584; firstLine and hanging are exclusive. Unset fields keep their value.
OptionalfirstLine?: numberOptionalhanging?: numberOptionalleft?: numberOptionalmirror?: booleanMirror indents: on facing pages left is the inside indent and right the outside.
Optionalright?: numberSets italic (Ctrl+I).
Sets the text's language and whether spelling is checked; what isn't given is kept.
Numbers the section's lines, or stops (null).
Sets the line spacing: 0.06 to 132 lines, or 0.7 to 1584 points.
Makes the paragraphs a bullet or numbered list, or removes the list (null).
Defines the selection's list levels (level k of levels is level k; the levels after them are kept) for the
whole list, from this paragraph on, or for the selected paragraphs. Outside a list, makes a new one.
Changes the list level (Tab, Shift+Tab at an item's start); in a list.
Sets the margins, 0 to 1584; unset fields keep their value.
Switches between editing and design mode.
Sets how the document's pages pair and where the gutter is; unset fields keep their value.
Sets footnotes' or endnotes' position, number format, first number and restarting, for the caret section or the
whole document (the default); unset fields keep their value. Footnotes go at the pageBottom or beneathText;
endnotes at the sectionEnd or documentEnd (the whole document's).
OptionalapplyTo?: "wholeDocument" | "thisSection"Optionalcolumns?: numberFootnotes only: the footnote area's columns, 1 to 4, or the section's own (0).
Optionalformat?: NumberFormatOptionalposition?: NotePositionOptionalrestart?: "continuous" | "eachSection" | "eachPage"Optionalstart?: numberSet Numbering Value: starts a new list at value, or continues the previous list (skipping to value with advance).
Places the floating object: each axis given is aligned, offset, or (with neither) kept where it is and measured
from its new reference; vertical: { relativeTo: 'page' } fixes it on the page, 'paragraph' moves it with text.
Unset fields keep their value.
Sets the selected objects' rotation, 0 to 360 degrees clockwise.
Sets the object's size, 1 to 1584.
Optionalheight?: numberOptionallockAspect?: booleanOptionalrelativeHeight?: "none" | RelativeSizeA floating object's height as a share of a box on the page, or absolute ('none').
OptionalrelativeWidth?: "none" | RelativeSizeA floating object's width as a share of a box on the page, or absolute ('none').
Optionalwidth?: numberSets the sides text wraps on around the floating object and its distance from the text, 0 to 1584; unset fields keep their value.
Sets the orientation.
Sets the outline level (1 to 9, or 0 for body text) and whether the paragraphs open collapsed; unset fields keep their value.
Sets the page borders of the selection's section, or of every section: each edge given is set or removed (null),
the rest kept; what they're measured from, and the pages they show on.
OptionalapplyTo?: "wholeDocument" | "thisSection"Optionalbottom?: BorderLine | nullOptionaldisplay?: "allPages" | "firstPage" | "notFirstPage"Optionalleft?: BorderLine | nullOptionaloffsetFrom?: "text" | "page"Optionalright?: BorderLine | nullOptionalshadow?: booleanA shadow on the bottom and right edges.
OptionalsurroundFooter?: booleanThe borders go around the footer (every section's).
OptionalsurroundHeader?: booleanThe borders go around the header (every section's).
Optionaltop?: BorderLine | nullSets the page colour of the document: no fill, a solid colour (a theme colour takes one tint or shade), a gradient,
a pattern, or a picture (tile makes it a texture). A picture fill with an empty image keeps the page's own.
Sets the section's page number format, first number (null continues from the section before) and chapter numbers (null for none); unset fields keep their value.
Sets where text sits between the section's top and bottom margins.
Sets the paper size, in portrait, 36 to 1584.
Sets the selected paragraphs' border lines: each edge given is set, or removed (null); the rest are kept.
Optionalbetween?: BorderLine | nullThe line between paragraphs with the same borders.
Optionalbottom?: BorderLine | nullOptionalleft?: BorderLine | nullOptionalright?: BorderLine | nullOptionalshadow?: booleanA shadow on the bottom and right edges set here.
Optionaltop?: BorderLine | nullSets the paragraph borders (a half-point single line).
Sets the pagination flags; unset fields keep their value.
OptionaldontHyphenate?: booleanDon't hyphenate the paragraph.
OptionalkeepLinesTogether?: booleanOptionalkeepWithNext?: booleanOptionalpageBreakBefore?: booleanOptionalsuppressLineNumbers?: booleanLeaves the paragraph's lines out of line numbering.
OptionaltextboxTightWrap?: TightWrapIn a text box, which lines text around the box wraps tightly to.
OptionalwidowControl?: booleanSets or removes (null) the paragraph shading.
Sets the space before and after, 0 to 1584; unset fields keep their value.
Optionalafter?: number | "auto"Optionalbefore?: number | "auto"Optionalcontextual?: booleanNo space between paragraphs of the same style.
Sets the picture's transparency, greyscale, brightness, contrast and transparent colour; unset fields keep their value.
Crops the selected picture by fractions of its image from each edge (0 to 1; negative pads it): its box follows the part shown, at the scale it is drawn. Unset fields keep their value.
Sets the tag prefixes (compared without case) whose picture controls keep their pictures: editing can't delete,
paste over or replace such a picture; fillControl and setControl still change it, and in design mode deleting
it removes its whole control. Replaces the prefixes set before; an empty list protects none. Not saved.
Lets rows break across pages.
Hides the rows' end marks (a row hides when its text is hidden too), and sets the table properties the rows
override: reset drops their own first.
Sets what a click on the ruler adds; answers the tab type popover. View.
Sets where the section starts: the break before it.
Sets the selection mode (F8 extends, Ctrl+Shift+F8 selects a block).
Shades the selected paragraphs, text, cells or tables (a table's shows around cells with spacing): the fill, and a pattern of color over it. fill: 'none' with a clear pattern removes the shading.
Sets the selected objects' shadows, glow, soft edge and blur; unset fields keep their value, null removes.
Sets the selected objects' fill; fromStyle gives them the style reference's again.
Sets the selected objects' outline; unset fields keep their value.
Changes the shape's preset geometry; its text, fill, outline and effects stay and its adjust values reset.
Sets the shape's text insets, anchor, autofit, wrapping and direction; unset fields keep their value.
Sets small caps (Ctrl+Shift+K).
Sets strikethrough.
Sets a style's list flags; what isn't given is kept.
Sets subscript (Ctrl+=).
Which fields are sub-template references: replaces the rules; an empty list turns sub-templates off. View.
Shows references' sub-template bodies in their place, or their fields (default: every reference). View.
Sets superscript (Ctrl+Shift+=).
Sets the table alignment.
Sets the table's alternative text title and description; unset fields keep their value.
Sets the space between the table's cells, 0 to 1584, or none (null).
Sets the table indent, -1584 to 1584.
Positions the caret's table, so text wraps around it, as dragging its move handle does: a table without a
position gets one across from the margin and down from the paragraph, and each axis given is aligned, offset, or
(with neither) kept where it is and measured from its new reference. Unset fields keep their value; null puts
the table back in the text.
Sets which parts of the table style apply; unset fields keep their value.
Sets or removes (border: null) the selected text's border: a box of one line, with a shadow or not.
Sets the text's fill, outline, shadow, glow and reflection: each one given replaces the text's own, null turns it
off (over a style's too; a fill is only removed), and what isn't given is kept.
Turns change tracking on or off (Ctrl+Shift+E).
Sets the scale, kerning and OpenType features; what isn't given is kept.
Sets the underline's colour, or the text's ('auto'); underlined text only.
Sets view options: formatting marks (Ctrl+Shift+8), gridlines, text boundaries, live layout, the chrome's theme and accent, the page's appearance, the measuring detail and the object grid.
Sets the document's watermark, in every header: the text or the picture replaces the one there.
Sets the zoom: 10 to 500 percent, or a fit.
Asks for the options of the correction just made (popoverRequested), Alt+Shift+F10. View.
Shows field codes or results (Alt+F9, Shift+F9). View.
Asks for the options of the tab stop nearest the caret (popoverRequested). View.
Asks for the tab type popover (popoverRequested). View.
Shrinks the font to the previous standard size (Ctrl+Shift+<).
Splits the selected cells.
Splits the table above the current row.
Undoes the last step.
Ungroups the selected group. Its children are selected.
Replaces fields by their results (Ctrl+Shift+F9).
Optionaloptions: FieldTargetsUpdates fields (F9); emits fieldsUpdateRequested for the fields the application computes.
Optionaloptions: FieldTargetsChanges a style to the selection's formatting (its paragraph's and its first run's direct formatting).
Wraps the selected paragraphs or table rows in a repeating section.
Optionaloptions: { tag?: string; title?: string }
Every edit, one method per command. Each resolves after its change commits, with
getState()already at that revision, and rejects withEditorError. Commands act on the selection at the time they run. Each is one undo step unless its documentation says otherwise: typing joins consecutiveinsertTextanddeletecalls in one paragraph into one step; view changes no document and adds no undo step.