Page breaks in ODT export
Available in Start planBeta
The PageBreak extension lets users insert explicit page breaks in the editor. When combined with the ODT export extension, these page breaks are included in the exported document.
How it works
Page breaks are fully supported in ODT export. The ODT export uses DOCX conversion under the hood, where pageBreak nodes are converted to <w:br w:type="page"/>, producing standard page breaks in the resulting ODT file.
Setting up PageBreak with ODT export
Register the PageBreak extension alongside the ODT export extension. Page breaks in your editor content will be automatically converted when exporting.
import { Editor } from '@tiptap/core'
import StarterKit from '@tiptap/starter-kit'
import { ExportOdt } from '@tiptap-pro/extension-export-odt'
import { PageBreak } from '@tiptap-pro/extension-pagebreak'
const editor = new Editor({
extensions: [
StarterKit,
PageBreak,
ExportOdt.configure({
appId: 'your-app-id',
token: 'your-jwt',
onCompleteExport: (result) => {
const blob = new Blob([result], { type: 'application/vnd.oasis.opendocument.text' })
const url = URL.createObjectURL(blob)
const a = document.createElement('a')
a.href = url
a.download = 'export.odt'
a.click()
URL.revokeObjectURL(url)
},
}),
],
})Learn more
- PageBreak extension reference for full options, commands, and keyboard shortcuts
- Page breaks in DOCX import for import support
- ODT export guide for general export setup