Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modules/ROOT/examples/live-demos/full-featured/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,8 @@ tinymce.init({
'size': 'Letter'
}
},
pagebreak_separator: '<div style="break-after: page"></div>',
pagebreak_split_block: true,
importword_converter_options: {
'formatting': {
'styles': 'inline',
Expand Down
4 changes: 4 additions & 0 deletions modules/ROOT/pages/exportpdf.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ tinymce.init({
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/`.
====

== Additional Configuration

include::partial$misc/pagebreak-export-note.adoc[]

== Options

The following configuration options affect the behavior of the {pluginname} plugin.
Expand Down
5 changes: 5 additions & 0 deletions modules/ROOT/pages/exportword.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:description_short: Generate a .docx file directly from the editor.
:keywords: plugin, {plugincode}, {pluginname}
:plugincategory: premium
:plugincode: exportword

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

Expand Down Expand Up @@ -71,6 +72,10 @@ tinymce.init({
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/`.
====

== Additional Configuration

include::partial$misc/pagebreak-export-note.adoc[]

== Options

The following configuration options affect the behavior of the {pluginname} plugin.
Expand Down
38 changes: 38 additions & 0 deletions modules/ROOT/partials/misc/pagebreak-export-note.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[NOTE]
====
.Page break support
To ensure page breaks work correctly in exported documents, configure the `pagebreak_separator` and `pagebreak_split_block` options:
ifeval::["{plugincode}" == "exportpdf"]

[source,js]
----
tinymce.init({
selector: 'textarea',
plugins: 'exportpdf',
toolbar: 'exportpdf',
pagebreak_separator: '<div style="break-after: page"></div>',
Comment thread
kemister85 marked this conversation as resolved.
pagebreak_split_block: true,
// ... other configuration options
});
----

For PDF exports, ensure your content includes proper page break elements that will be converted to PDF page breaks.
endif::[]

ifeval::["{plugincode}" != "exportpdf"]

[source,js]
----
tinymce.init({
selector: 'textarea',
plugins: 'exportword',
toolbar: 'exportword',
pagebreak_separator: '<div style="break-after: page"></div>',
pagebreak_split_block: true,
// ... other configuration options
});
----

For DOCX exports, the page breaks will be converted to Word-compatible page breaks.
endif::[]
====