Skip to content

Commit 13f24a1

Browse files
committed
DOC-3286: Add additional config option to full feature demo, and relevant doc pages as note.
1 parent 1c12177 commit 13f24a1

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,7 @@ tinymce.init({
712712
'size': 'Letter'
713713
}
714714
},
715+
pagebreak_separator: '<div style="break-after: page"></div>',
715716
importword_converter_options: {
716717
'formatting': {
717718
'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: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[NOTE]
2+
====
3+
.Page break support
4+
To ensure page breaks work correctly in exported documents, configure the `pagebreak_separator` option:
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+
// ... other configuration options
15+
});
16+
----
17+
18+
For DOCX exports, the page breaks will be converted to Word-compatible page breaks.
19+
endif::[]
20+
21+
ifeval::["{plugincode}" != "exportpdf"]
22+
23+
[source,js]
24+
----
25+
tinymce.init({
26+
selector: 'textarea',
27+
plugins: 'exportword',
28+
toolbar: 'exportword',
29+
pagebreak_separator: '<div style="break-after: page"></div>',
30+
// ... other configuration options
31+
});
32+
----
33+
34+
For PDF exports, ensure your content includes proper page break elements that will be converted to PDF page breaks.
35+
endif::[]
36+
====

0 commit comments

Comments
 (0)