Skip to content

Commit 2a19da9

Browse files
authored
DOC-3286: Add additional config option to full feature demo, and relevant doc pages as note. (#3862)
* DOC-3286: Add additional config option to full feature demo, and relevant doc pages as note. * DOC-3286: Add pagebreak_split_block to workaround and live-demo to fix p tag issue.
1 parent 46a946b commit 2a19da9

File tree

4 files changed

+49
-0
lines changed

4 files changed

+49
-0
lines changed

modules/ROOT/examples/live-demos/full-featured/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,8 @@ tinymce.init({
712712
'size': 'Letter'
713713
}
714714
},
715+
pagebreak_separator: '<div style="break-after: page"></div>',
716+
pagebreak_split_block: true,
715717
importword_converter_options: {
716718
'formatting': {
717719
'styles': 'inline',

modules/ROOT/pages/exportpdf.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ tinymce.init({
6464
The `exportpdf_service_url` option automatically appends `/v1/convert` to the URL provided, so only the base URL is required. For example, if the service is hosted at `http://localhost:8080/v1/convert`, the `exportpdf_service_url` option should be set to `http://localhost:8080/`. When using in production, ensure that `exportpdf_service_url` is updated to the production URL such as `https://myserver.com/`.
6565
====
6666

67+
== Additional Configuration
68+
69+
include::partial$misc/pagebreak-export-note.adoc[]
70+
6771
== Options
6872

6973
The following configuration options affect the behavior of the {pluginname} plugin.

modules/ROOT/pages/exportword.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
:description_short: Generate a .docx file directly from the editor.
88
:keywords: plugin, {plugincode}, {pluginname}
99
:plugincategory: premium
10+
:plugincode: exportword
1011

1112
include::partial$misc/admon-export-word-paid-addon-pricing.adoc[]
1213

@@ -71,6 +72,10 @@ tinymce.init({
7172
The `exportword_service_url` option automatically appends `/v2/convert/html-docx` to the URL provided, so only the base URL is required. For example, if the service is hosted at `http://localhost:8080/v2/convert/html-docx`, the `exportword_service_url` option should be set to `http://localhost:8080/`. When using in production, ensure that `exportword_service_url` is updated to the production URL such as `https://myserver.com/`.
7273
====
7374

75+
== Additional Configuration
76+
77+
include::partial$misc/pagebreak-export-note.adoc[]
78+
7479
== Options
7580

7681
The following configuration options affect the behavior of the {pluginname} plugin.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[NOTE]
2+
====
3+
.Page break support
4+
To ensure page breaks work correctly in exported documents, configure the `pagebreak_separator` and `pagebreak_split_block` options:
5+
ifeval::["{plugincode}" == "exportpdf"]
6+
7+
[source,js]
8+
----
9+
tinymce.init({
10+
selector: 'textarea',
11+
plugins: 'exportpdf',
12+
toolbar: 'exportpdf',
13+
pagebreak_separator: '<div style="break-after: page"></div>',
14+
pagebreak_split_block: true,
15+
// ... other configuration options
16+
});
17+
----
18+
19+
For PDF exports, ensure your content includes proper page break elements that will be converted to PDF page breaks.
20+
endif::[]
21+
22+
ifeval::["{plugincode}" != "exportpdf"]
23+
24+
[source,js]
25+
----
26+
tinymce.init({
27+
selector: 'textarea',
28+
plugins: 'exportword',
29+
toolbar: 'exportword',
30+
pagebreak_separator: '<div style="break-after: page"></div>',
31+
pagebreak_split_block: true,
32+
// ... other configuration options
33+
});
34+
----
35+
36+
For DOCX exports, the page breaks will be converted to Word-compatible page breaks.
37+
endif::[]
38+
====

0 commit comments

Comments
 (0)