Skip to main content

Documentation Index

Fetch the complete documentation index at: https://superdoc-nick-sd-2070-add-content-controls-namespace-to-doc.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Insert automatic page numbers in headers and footers. Dynamic page numbering that updates as document changes, with total page count support.

OOXML Structure

<!-- Page number field -->
<w:fldSimple w:instr="PAGE">
  <w:r>
    <w:t>1</w:t>
  </w:r>
</w:fldSimple>

<!-- Total pages field -->
<w:fldSimple w:instr="NUMPAGES">
  <w:r>
    <w:t>10</w:t>
  </w:r>
</w:fldSimple>

Use case

  • Professional documents - Standard page numbering
  • Reports - Page X of Y format
  • Legal documents - Required pagination
  • Print layouts - Automatic page tracking
  • Dynamic updates - Numbers adjust as content changes

Options

Configure the extension behavior:
htmlAttributes
Object
HTML attributes for page number elements

Commands

addAutoPageNumber

Insert an automatic page number
Only works in header/footer contexts
Example:
editor.commands.addAutoPageNumber()
Returns: Function Command function

addTotalPageCount

Insert total page count
Only works in header/footer contexts
Example:
editor.commands.addTotalPageCount()
Returns: Function Command function

Keyboard shortcuts

CommandShortcutDescription
addAutoPageNumber()⌘/Ctrl-Shift-Alt-pInsert page number
addTotalPageCount()⌘/Ctrl-Shift-Alt-cInsert total page count

Source code