Skip to content

Commit 7ad29fd

Browse files
kemister85ShiridiGandhamhamza0867
authored
DOC-3147: The default value of pagebreak_split_block is now true to match the new pagebreak_separator default. (#3795)
* DOC-3147: The default value of pagebreak_split_block is now true to match the new pagebreak_separator default. * Update modules/ROOT/pages/8.0-release-notes.adoc Co-authored-by: shirqa <[email protected]> * Update modules/ROOT/pages/8.0-release-notes.adoc Co-authored-by: shirqa <[email protected]> * Update modules/ROOT/pages/8.0-release-notes.adoc Co-authored-by: Hamza Benkhaldoun <[email protected]> * Update modules/ROOT/pages/8.0-release-notes.adoc Co-authored-by: Hamza Benkhaldoun <[email protected]> --------- Co-authored-by: shirqa <[email protected]> Co-authored-by: Hamza Benkhaldoun <[email protected]>
1 parent 51bc9ae commit 7ad29fd

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

modules/ROOT/pages/8.0-release-notes.adoc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,34 @@ With the release of {productname} {release-version}, this issue has been resolve
252252

253253
This change aligns better with modern standards and ensures that page breaks are now accurately rendered in exported documents.
254254

255+
=== The `pagebreak_split_block` option now defaults to `true`. When a page break is inserted, the resulting HTML output is: `<div style="break-after: page"></div>.`
256+
// #TINY-12462
257+
258+
The default value for the `pagebreak_split_block` option has been changed from `false` to `true`. This change improves the user experience when inserting page breaks within block elements such as paragraphs, lists, or tables. When enabled:
259+
260+
* Page breaks will automatically split the block element at the cursor position
261+
* Content after the page break will be moved to a new block element of the same type
262+
* The structure and formatting of the content is preserved on both sides of the page break
263+
264+
For example, with this HTML content:
265+
266+
[source,html]
267+
----
268+
<p>First page</p>
269+
----
270+
271+
When placing the cursor after the word "First" and inserting a page break, the result will be:
272+
273+
[source,html]
274+
----
275+
<p>First </p>
276+
<div style="break-after: page"></div>
277+
<p>page</p>
278+
----
279+
280+
This behavior is now enabled by default, but can be disabled by setting `pagebreak_split_block: false` in the editor configuration.
281+
282+
For more information on the `pagebreak_split_block` option, see xref:pagebreak.adoc#pagebreak_split_block[pagebreak_split_block].
255283

256284
[[removed]]
257285
== Removed
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
[[pagebreak_split_block]]
22
== `+pagebreak_split_block+`
33

4-
When enabled this option makes it easier to split block elements with a page break.
4+
By default, page breaks automatically split block elements (such as paragraphs, lists, or tables) at the cursor position while preserving the structure and formatting of the content. This option can be used to disable this behavior by setting it to `false` if this is undesired.
55

66
*Type:* `+Boolean+`
77

8-
*Default value:* `+false+`
8+
*Default value:* `+true+`
99

1010
*Possible values:* `+true+`, `+false+`
1111

1212
=== Example: using `+pagebreak_split_block+`
1313

1414
[source,js]
1515
----
16+
// Disable the block splitting behavior
1617
tinymce.init({
1718
selector: 'textarea', // change this value according to your HTML
1819
plugins: 'pagebreak',
1920
toolbar: 'pagebreak',
20-
pagebreak_split_block: true
21+
pagebreak_split_block: false
2122
});
2223
----

0 commit comments

Comments
 (0)