# Page break

The page break feature lets you insert page breaks into your content. This gives you more control over the final structure of a document that is printed or [exported to PDF](converters/export-pdf.md) or [Word](converters/export-word.md).

> **Unlock this feature with selected CKEditor Plans**
>
> Try all premium features – no credit card needed.
>
> [Sign up for a free trial ](https://portal.ckeditor.com/checkout?plan=free)[Select a Plan](https://ckeditor.com/pricing/)

<a id="demo">

## Demo

Use the insert page break toolbar button to see the feature in action. Use the “Open print preview” button below the editor to preview the content.

<!-- AI-AGENT-NOTE: An interactive demo is embedded here but is not represented in this Markdown file. If you need to see it in action, open this page in a browser (e.g. via a browser-automation MCP like Chrome DevTools or Playwright), or let the user know a live demo is available on this page. -->

This demo presents a limited set of features. Visit the [feature-rich editor example](../examples/builds-custom/full-featured-editor.md) to see more in action.

<a id="installation">

## Installation

After [installing the editor](../getting-started/installation/cloud/quick-start.md), add the feature to your plugin list and toolbar configuration:

**NPM**

```js
import { ClassicEditor, PageBreak } from 'ckeditor5';

ClassicEditor
	.create( {
		licenseKey: '<YOUR_LICENSE_KEY>', // Or 'GPL'.
		plugins: [ PageBreak, /* ... */ ],
		toolbar: [ 'pageBreak', /* ... */ ],
	} )
	.then( /* ... */ )
	.catch( /* ... */ );
```

**CDN**

```js
const { ClassicEditor, PageBreak } = CKEDITOR;

ClassicEditor
	.create( {
		licenseKey: '<YOUR_LICENSE_KEY>',
		plugins: [ PageBreak, /* ... */ ],
		toolbar: [ 'pageBreak', /* ... */ ],
	} )
	.then( /* ... */ )
	.catch( /* ... */ );
```

<a id="related-features">

## Related features

Here are some useful CKEditor 5 features that you can use together with the page break plugin for an all-around paged editing experience:

* The [pagination feature](pagination/pagination.md) allows you to see where page breaks would be after the document is [exported to PDF](converters/export-pdf.md) or [to Word](converters/export-word.md).
* The [export to Word](converters/export-word.md) feature will allow you to generate editable, paged `.docx` files out of your editor-created content.
* The [export to PDF](converters/export-pdf.md) feature will allow you to generate portable, paged PDF files out of your editor-created content.

<a id="common-api">

## Common API

The [`PageBreak`](../api/module_page-break_pagebreak-PageBreak.md) plugin registers:

* the UI button component (`'pageBreak'`),
* the `'pageBreak'` command implemented by [`PageBreakCommand`](../api/module_page-break_pagebreakcommand-PageBreakCommand.md).

You can execute the command using the [`editor.execute()`](../api/module_core_editor_editor-Editor.md#function-execute) method:

```js
// Inserts a page break into the selected content.
editor.execute( 'pageBreak' );
```

> **Note**
>
> We recommend using the official [CKEditor 5 inspector](../framework/development-tools/inspector.md) for development and debugging. It will give you tons of useful information about the state of the editor such as internal data structures, selection, commands, and many more.

<a id="contribute">

## Contribute

The source code of the feature is available on GitHub at <https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-page-break>.

---

Full index of the CKEditor 5 documentation: [llms.txt](../../llms.txt)
