Back to the template, at its selection from before.
A new sub-template: empty, with the body of the DOCX from, or a copy of the sub-template copyOf in the same
category (its formatting, fields, controls, pictures and references). One undo step.
Optionaloptions: { category?: string; copyOf?: string; from?: Uint8Array<ArrayBufferLike> }Edits a sub-template's body on its own pages (category: when several rules name categories).
Optionalcategory: stringA standalone DOCX of a sub-template's body, with the document's styles, numbering, theme and fonts and without
its headers, footers or other sub-templates; create(name, { from }) reads it back unchanged.
Optionaloptions: { category?: string }The sub-templates the rules declare, in glossary order.
Removes a sub-template; its references no longer resolve. One undo step.
Optionaloptions: { category?: string }Renames a sub-template; updateReferences renames every reference to it too. One undo step.
Optionaloptions: { category?: string; updateReferences?: boolean }
The template's sub-templates, and editing one in this editor. While one is edited,
state.editingnames it and every command, query and event concerns its body;editingTargetChangedfires on each switch.