Pagination

The pagination feature for CKEditor 5 allows you to see where the page breaks would be after the document is exported to PDF or Word. It helps ensure the file will generate and print correctly with the identical page structure that the user sees in the WYSIWYG editor.

The feature shows you the page numbering as well as the total number of pages in the document. It also introduces a dedicated toolbar that allows the user to easily go to the next or previous page of the document or jump straight to a selected page.

The pagination feature is complementary to both the export to PDF and export to Word features, providing proper output every time. It also respects page breaks inserted by the user with the page break feature.

Pagination toolbar and page markers in the CKEditor 5 WYSIWYG editor.

# Trial limitations

Please note that the trial version of this plugin, while keeping all the functions, only allows for limited use.

When used in the trial mode, the pagination plugin allows conducting of about half a thousand operations within the editor, while retaining full functionality. Once this limit is reached, the editor goes into read-only mode. An error message will then be produced, informing the user that the trial has reached its limit.

The functionality may be restored by reloading the editor instance (remember to save the content as refreshing will clear all the data).

# Activating the pagination feature

Please refer to the Quick start guide for information on how to start using the pagination feature in your CKEditor 5 WYSIWYG editor build.

# Integrating the pagination feature with CKEditor 5

To install the plugin into your WYSIWYG editor, use the online builder to generate a custom CKEditor 5 build with the plugin enabled. Alternatively, refer to the installation guide in the plugin documentation to do it on your own.

To set up the feature, you need to add the license key to your CKEditor 5 configuration as described in the installation guide.

Apart from setting the license key, the configuration of this feature in the editor is the key to allowing pagination to measure where the page breaks would be and to produce a 1:1 result with the export to PDF or Word features. Refer to the configuration section of the Pagination feature guide for more information.

# Compatibility issues

Currently, the pagination feature works best with the following web browsers:

  • Chrome
  • Chromium
  • latest Edge
  • latest Opera

The pagination plugin does not work in Firefox as of yet. There are also some glitches in Safari. To prevent users from seeing potentially invalid pagination, the plugin disables itself after detecting these unsupported browsers.

# Enabling pagination in unsupported browsers

If you want to enable the pagination feature on unsupported browsers anyway, you can set the config.pagination.enableOnUnsupportedBrowsers configuration option to true or enable it at the runtime by calling editor.plugins.get( 'Pagination' ).clearForceDisabled( 'browserCheck' ).

If you have any further comments or suggestions concerning this feature, please contact us and share them. We will be happy to hear your feedback!