Repository navigation
Free A4 pagination for TipTap 3: tables split across pages, header rows repeat #8572
HuyPhan1232203
started this conversation in
Community Extensions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description
Free, open-source page layout for TipTap 3 — content flows across real A4 / A5 / Letter / Legal pages, like Word or Google Docs.
Live demo: https://text-editor-react-neon.vercel.app/ (paste a long doc or a big table to try it)
rowspan) and repeat their header row on the next pagegetHTML()/getJSON()stay clean and your CSS is untouchedInstallation
npm install tiptap-a4-pagination
Usage
The editor needs to sit inside a page element whose padding is the page margins (
.document-pageby default, configurable withpageSelector):editor.storage.pagination.pageCountgives the current number of pages. Full API in the README.Type
Prosemirror plugin
Other
Demo: https://text-editor-react-neon.vercel.app/ — a full Word-like editor built on it (paste a long doc or a big table to try it)
Source: https://github.com/HuyPhan1232203/Text-editor-react/tree/main/packages/tiptap-a4-pagination
Known limitations: a single paragraph taller than the remaining space moves to the next page as a whole (it isn't split), and a table row taller than a page overflows.
Feedback and edge cases that break the layout are very welcome!
All reactions