Page Break plugin
This plugin adds page break support and enables a user to insert page breaks in the editable area. This is useful where a CMS uses a special separator to break content into pages.
It also adds a toolbar button and a menu item Page break under the Insert menu dropdown.
Basic setup
tinymce.init({
selector: 'textarea', // change this value according to your html
plugins: 'pagebreak',
toolbar: 'pagebreak'
});
Options
These settings affect the execution of the pagebreak plugin. They enable you to specify how the page break should be generated in the HTML source code and determine whether the page break element(s) should be wrapped in <p> tags.
pagebreak_separator
The pagebreak_separator option allows you to specify the separator string that will be used to identify page breaks in the content.
Type: String
Default value: '<!-- pagebreak -->'
pagebreak_separatortinymce.init({
selector: 'textarea', // change this value according to your HTML
plugins: 'pagebreak',
toolbar: 'pagebreak',
pagebreak_separator: '<!-- my page break -->'
});
pagebreak_split_block
When enabled, this option makes it easier to split block elements with a page break.
Type: Boolean
Possible values: true, false
Default value: false
pagebreak_split_blocktinymce.init({
selector: 'textarea', // change this value according to your HTML
plugins: 'pagebreak',
toolbar: 'pagebreak',
pagebreak_split_block: true
});
Toolbar buttons
The Page Break plugin provides the following toolbar buttons:
| Toolbar button identifier | Description |
|---|---|
|
Inserts a pagebreak into the editor. |
These toolbar buttons can be added to the editor using:
-
The
toolbarconfiguration option. -
The
quickbars_insert_toolbarconfiguration option.
Menu items
The Page Break plugin provides the following menu items:
| Menu item identifier | Default Menu Location | Description |
|---|---|---|
|
Insert |
Inserts a pagebreak into the editor. |
These menu items can be added to the editor using:
-
The
menuconfiguration option. -
The
contextmenuconfiguration option.