Headers & footers
Edit DOCX headers and footers in place, insert page fields, and use per-section first-page and even-page variants.
Headers and footers render on every page exactly where Word puts them, and they are edited in place. There is no separate header dialog: double-click the header or footer area and type.
Editing
Double-click inside the header or footer band to enter edit mode. From there, editing follows the same model as the document body: click to place the caret, drag to select, double- and triple-click for word and paragraph selection, right-click menus, hyperlinks, image selection, and table row, column, and edge resize all work identically. Undo and redo cover header and footer edits.
While editing, a separator bar labels the region (Header or Footer) and shows an Options menu:
- Insert current page number inserts a PAGE field.
- Insert total page count inserts a NUMPAGES field.
- Remove header/footer clears the region.
Press Escape or click the close action to save and leave header/footer editing.
PAGE and NUMPAGES fields
Page-number fields are stored as real Word fields, not static text. The page view renders the resolved value on each page (page 3 of a 10-page document shows "3" and "10"), values update as the document reflows, and the fields round-trip to OOXML so Word keeps them live.
A "Page X of Y" footer is the two inserts with literal text between them: type the text "Page ", insert the page number, type " of " with the surrounding spaces, insert the total page count.
Per-section headers and footers
The OOXML model attaches header and footer references to sections, and the editor honors it:
- Each section can reference
default,first, andevenheader and footer parts (w:headerReference/w:footerReference). - Different first page (
w:titlePg) shows thefirstvariant on a section's first page. Typical use: no header on a title page. - Different odd and even pages (
w:evenAndOddHeaders) alternatesdefaultandevenvariants, as in book-style layouts. - Sections without their own references inherit from earlier sections, matching Word's "link to previous" behavior.
Documents using any of these render and round-trip correctly; editing a header edits the specific part the page displays.
Watermarks
Watermarks live in header parts (that is how Word models them). Their VML or DrawingML markup and image payloads are preserved through editing and save.
Dedicated watermark rendering, insertion, editing, and headless authoring are not supported yet. Existing watermarks remain inert rather than being dropped.
Next steps
- Architecture for how header/footer editing shares the body's editing model
- Loading and saving for the save pipeline that round-trips these parts
- Editing API for editing a document from a server
Content controls
Find and fill Word content controls by tag or id. Set text, dropdown, checkbox, and date values, from inside the editor or from a server-side script.
Images & drawings
Inline and floating DrawingML pictures in DOCX: supported formats, wrap modes, authoring them from React, accessibility, and the security boundaries.