Install
You must install this package along with its peer dependency:
npm install tiptap-pagination-plus
For Table with pagination
Section titled “For Table with pagination”npm install tiptap-table-plus
Peer Dependencies
Section titled “Peer Dependencies”This package works with peer dependencies and requires the following packages to be installed in your project:
npm install @tiptap/extension-table @tiptap/extension-table-cell @tiptap/extension-table-header @tiptap/extension-table-row @tiptap/pm
Note: Make sure you have these peer dependencies installed as they are required for the package to function properly. The package will not work without these Tiptap extensions and ProseMirror.
Configuration Options
Section titled “Configuration Options”Option | Type | Default | Description |
---|---|---|---|
pageHeight | number | 800 | Height of each page in pixels |
pageGap | number | 50 | Gap between pages in pixels |
pageGapBorderSize | number | 1 | Border size for page gaps |
pageBreakBackground | string | ”#ffffff” | Background color for page gaps |
pageHeaderHeight | number | 50 | Height of page header in pixels |
pageFooterHeight | number | 50 | Height of page footer in pixels |
footerRight | string | ”{page}“ | Custom text to display in the footer right side |
footerLeft | string | "" | Custom text to display in the footer left side |
headerRight | string | "" | Custom text to display in the header right side |
headerLeft | string | "" | Custom text to display in the header left side |
marginTop | number | 0 | Top margin for pages |
marginBottom | number | 0 | Bottom margin for pages |
marginLeft | number | 50 | Left margin for pages |
marginRight | number | 50 | Right margin for pages |
contentMarginTop | number | 0 | Top margin for content within pages |
contentMarginBottom | number | 0 | Bottom margin for content within pages |
Note:
tiptap-pagination-plus
extends the default Tiptap pagination extension with additional functionality.