@tiptap-pro/extension-pages Changelog
Changelog for @tiptap-pro/extension-pages
0.22.1
Patch Changes
-
d43e16d: Match Microsoft Word for
differentFirstPageanddifferentOddEven:- Empty type-specific header/footer slots (first / odd / even) now render empty in the editor instead of silently falling back to the default.
setDifferentOddEven(true)copies the default content into the odd slot so pages 1, 3, 5... keep showing the existing header/footer (Word continuity). Even pages start empty.setDifferentFirstPagedoes not copy (Word: first slot is a separate blank slot).- Toggling either
different*flag while a header/footer overlay is open now refreshes the overlay so it shows the new variant right away. setHeader/setFooterand the six typed setters (setHeader{FirstPage,Odd,Even}/setFooter{FirstPage,Odd,Even}) no longer corrupt storage to<p></p>when called while an overlay is open.
0.22.0
Minor Changes
- e9cd180: Add
resetHeaderTopMarginandresetFooterBottomMargincommands to clear the stored margin override and fall back to the active format's default.setHeaderTopMarginandsetFooterBottomMarginnow rejectNaNinputs alongside negative values.
Patch Changes
-
c1e3695: Fix issues with pagination, header/footer sizing, and scrolling when the editor uses CSS
zoomon mobile. The code now gets the correct scale directly from the element usinggetBoundingClientRect, instead of relying onstorage.zoom, so page counts stay accurate even when the screen changes.It also recalculates the page count right away on first load, so long documents show the correct number without needing any interaction. The pagination wrapper’s
min-heightis rounded to whole pixels to prevent tiny layout changes from triggering unnecessary updates. Lastly, it uses the browser’s built-inscrollIntoViewwhile zoomed, so typing no longer causes the view to jump across pages.
0.21.1
Patch Changes
- a18577d: Fix header and footer editor overlays overflowing the page width when zoom is not 100%. Removed the
width: ${100/zoom}%compensation on.tiptap-header-editor-container/.tiptap-footer-editor-container. Thezoomproperty already scales the inner layout coordinate space by1/zoom, sowidth: 100%(from the stylesheet) resolves correctly
0.21.0
Minor Changes
-
53979aa: Expose header and footer inner editor event subscriptions through Pages storage and keep active header/footer state in sync on focus.
New storage APIs:
editor.storage.pages.headerEditorOn/editor.storage.pages.headerEditorOfffor subscribing to and unsubscribing from header inner editor events.editor.storage.pages.footerEditorOn/editor.storage.pages.footerEditorOfffor subscribing to and unsubscribing from footer inner editor events.
Header/footer focus handling:
- Header and footer focus now update
activeEditor,activeEditorType, andactivePageNumberimmediately, so toolbars can react when an inner editor receives focus without waiting for a document update. - Header and footer overlays now scope their DOM lookups to the editor instance that opened them, preventing multiple mounted Pages editors from targeting the wrong header or footer element.
Patch Changes
- 221c1fd: Fix the dynamic header and footer margin reset behavior so that setting
headerTopMarginorfooterBottomMarginto0restores the default positioning used on the initial render. Also fix the header and footer height on the initial render, as their heights are currently incorrect when these margins are set during initialization. - fcf94d7: Fix header and footer editor overlays to calculate dynamic heights correctly when zoomed.
0.20.1
Patch Changes
-
830279c: PagesTableKit — table row grid and height refinements:
- TableRow grid columns now use
minmax(0, Nfr)when every cell has acolwidth— this preserves relative column proportions while guaranteeing the row fits the page content area. Fixes DOCX imports where the author drew tables wider than the printable area and the column-width sum overflowed the page. - Mixed rows (some cells carry
colwidth, others do not) fall back to fixedpxfor sized cells and1frfor unsized cells. - TableRow height now branches on the
heightRuleattribute —exactemitsheight+ the--tr-heightcustom property (hard clipping preserved),atLeastand unset values emitmin-heightso narrower columns can push the row taller instead of clipping content. Mirrors the ConvertKitrenderHTMLbehaviour inside the NodeView.
Pages — table row overflow containment:
- The Pages stylesheet now applies
max-width: 100%,min-width: 0, andoverflow-x: hiddento<tr>elements, plusmin-width: 0on cells. Contains DOCX-imported tables whose declared widths exceed the page content area so they no longer spill past the page edge.
- TableRow grid columns now use
0.20.0
Minor Changes
-
e3f8cd4: Add zoom support to the Pages extension for visual scaling of the editor content.
New option:
zoom— Set an initial zoom level when configuring the extension (e.g.Pages.configure({ zoom: 0.75 })). Accepts values from0.25(25%) to4(400%). Defaults to1(100%).
New command:
editor.commands.setZoom(value)— Dynamically change the zoom level at any time. The value is clamped to the[0.25, 4]range.
New storage properties:
editor.storage.pages.zoom— Read the current zoom level.editor.storage.pages.getZoom?.()— Get the current zoom level (function form for symmetry with other storage getters).
New callback:
onZoomChange— Option callback invoked whenever the zoom level changes, useful for keeping UI controls in sync (e.g. a zoom dropdown or slider).
Zoom behavior:
- Applies visual scaling to the entire editor including page content, headers, footers, and page breaks.
- Header and footer editors automatically match the current zoom level, including when zoom changes while an editor is open.
- Pagination calculations remain accurate at all zoom levels.
- Does not affect document structure or print output — zoom is purely visual.
0.19.1
Patch Changes
- 990f322: Remove unused
@tiptap-pro/extension-pagebreakpeer dependency
0.19.0
Minor Changes
-
4f38179: Add Pages-aware PageBreak behavior and integrate PageBreak into PageKit
@tiptap-pro/extension-pagebreak- Add Pages-aware node view that fills remaining page space to push content to the next page, mirroring MS Word's page break behavior
- Register measurement callbacks with the Pages extension's layout refresh cycle for synchronized height updates
- Implement multi-pass layout stabilization so consecutive page breaks converge correctly
- Add
insertPageBreakcommand withMod-Enterkeyboard shortcut - Support standard mode (visual dashed rule with label) and Pages mode (invisible space filler)
- Include drag-and-drop support and DOCX import compatibility
@tiptap-pro/extension-pages- Add
onAfterPageLayoutCallbacksstorage map for cooperating extensions to hook into the page layout refresh cycle - Extend
refreshPagewith multi-pass stabilization that re-runs callbacks until layout converges or the max pass limit is reached - Add
getDistanceToNextPagebreakandgetDistanceToPrevPagebreakstorage APIs for querying pixel distances to page boundaries - Schedule post-render recalculations via
requestAnimationFramewhen document changes affect page count - Add BFC loop detector reset on legitimate page-count recalculations to prevent false-positive oscillation detection
- Include
@tiptap-pro/extension-pagebreakas a peer dependency - Bundle PageBreak into PageKit by default (disable with
pagebreak: false) - BREAKING: Rename
pageBreakBackgroundoption topageGapBackground,setPageBreakBackgroundcommand tosetPageGapBackground, to avoid confusion with the new PageBreak extension - BREAKING: Pages extension no longer exports
PageKitorTableKit; they have been moved to separate@tiptap-pro/extension-pages-pagekitand@tiptap-pro/extension-pages-tablekitextensions.
Patch Changes
- Updated dependencies [4f38179]
- @tiptap-pro/extension-pagebreak@0.3.0
0.18.0
Minor Changes
- fcd13d5: Initial beta point for export and pages packages