Skip to content

Dynamic Variables | Header & Footer

Use {page} to display the current page number:

PaginationPlus.configure({
headerRight: "Page {page}",
footerRight: "Page {page}",
})

The {page} variable is automatically replaced with the current page number:

PaginationPlus.configure({
headerRight: "Page {page}",
footerRight: "Page {page}",
})

You can combine variables with HTML formatting:

PaginationPlus.configure({
footerRight: `<span style="font-weight: bold;">Page {page}</span>`,
})
headerRight: "Page {page}",
footerRight: "Page {page}",
headerRight: "Page {page}",
footerRight: "Page {page} of Document",

Variables work seamlessly with multiline content:

PaginationPlus.configure({
footerRight: `<p>Page {page}<br>
<small>Generated: ${new Date().toLocaleDateString()}</small></p>`,
})

Combine variables with HTML styling:

PaginationPlus.configure({
headerRight: `<span style="color: blue; font-weight: 600;">Page {page}</span>`,
footerRight: `<p style="margin: 0;">Page {page}<br>
<small style="color: #6b7280;">Footer Text</small></p>`,
})
tiptapplus.com is not an official Tiptap website and has no business affiliation with Tiptap.