From 13f24a159cf7ff25b8ba159bab62450fa574f0d5 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Wed, 17 Sep 2025 12:02:40 +1000 Subject: [PATCH 1/2] DOC-3286: Add additional config option to full feature demo, and relevant doc pages as note. --- .../live-demos/full-featured/index.js | 1 + modules/ROOT/pages/exportpdf.adoc | 4 +++ modules/ROOT/pages/exportword.adoc | 5 +++ .../partials/misc/pagebreak-export-note.adoc | 36 +++++++++++++++++++ 4 files changed, 46 insertions(+) create mode 100644 modules/ROOT/partials/misc/pagebreak-export-note.adoc diff --git a/modules/ROOT/examples/live-demos/full-featured/index.js b/modules/ROOT/examples/live-demos/full-featured/index.js index c29bb7a30e..fa6dbcfcd9 100644 --- a/modules/ROOT/examples/live-demos/full-featured/index.js +++ b/modules/ROOT/examples/live-demos/full-featured/index.js @@ -712,6 +712,7 @@ tinymce.init({ 'size': 'Letter' } }, + pagebreak_separator: '
', importword_converter_options: { 'formatting': { 'styles': 'inline', diff --git a/modules/ROOT/pages/exportpdf.adoc b/modules/ROOT/pages/exportpdf.adoc index 7032ad7341..1be2a9d008 100644 --- a/modules/ROOT/pages/exportpdf.adoc +++ b/modules/ROOT/pages/exportpdf.adoc @@ -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. diff --git a/modules/ROOT/pages/exportword.adoc b/modules/ROOT/pages/exportword.adoc index 042dd16561..2d02f37f99 100644 --- a/modules/ROOT/pages/exportword.adoc +++ b/modules/ROOT/pages/exportword.adoc @@ -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[] @@ -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. diff --git a/modules/ROOT/partials/misc/pagebreak-export-note.adoc b/modules/ROOT/partials/misc/pagebreak-export-note.adoc new file mode 100644 index 0000000000..10eb5535a7 --- /dev/null +++ b/modules/ROOT/partials/misc/pagebreak-export-note.adoc @@ -0,0 +1,36 @@ +[NOTE] +==== +.Page break support +To ensure page breaks work correctly in exported documents, configure the `pagebreak_separator` option: +ifeval::["{plugincode}" == "exportpdf"] + +[source,js] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'exportpdf', + toolbar: 'exportpdf', + pagebreak_separator: '
', + // ... other configuration options +}); +---- + +For DOCX exports, the page breaks will be converted to Word-compatible page breaks. +endif::[] + +ifeval::["{plugincode}" != "exportpdf"] + +[source,js] +---- +tinymce.init({ + selector: 'textarea', + plugins: 'exportword', + toolbar: 'exportword', + pagebreak_separator: '
', + // ... other configuration options +}); +---- + +For PDF exports, ensure your content includes proper page break elements that will be converted to PDF page breaks. +endif::[] +==== \ No newline at end of file From fc0b951063ff1ea27ded47ad8c53161682c9a798 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Wed, 17 Sep 2025 14:22:02 +1000 Subject: [PATCH 2/2] DOC-3286: Add pagebreak_split_block to workaround and live-demo to fix p tag issue. --- modules/ROOT/examples/live-demos/full-featured/index.js | 1 + modules/ROOT/partials/misc/pagebreak-export-note.adoc | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/examples/live-demos/full-featured/index.js b/modules/ROOT/examples/live-demos/full-featured/index.js index fa6dbcfcd9..82cd2155b7 100644 --- a/modules/ROOT/examples/live-demos/full-featured/index.js +++ b/modules/ROOT/examples/live-demos/full-featured/index.js @@ -713,6 +713,7 @@ tinymce.init({ } }, pagebreak_separator: '
', + pagebreak_split_block: true, importword_converter_options: { 'formatting': { 'styles': 'inline', diff --git a/modules/ROOT/partials/misc/pagebreak-export-note.adoc b/modules/ROOT/partials/misc/pagebreak-export-note.adoc index 10eb5535a7..3c08c029b6 100644 --- a/modules/ROOT/partials/misc/pagebreak-export-note.adoc +++ b/modules/ROOT/partials/misc/pagebreak-export-note.adoc @@ -1,7 +1,7 @@ [NOTE] ==== .Page break support -To ensure page breaks work correctly in exported documents, configure the `pagebreak_separator` option: +To ensure page breaks work correctly in exported documents, configure the `pagebreak_separator` and `pagebreak_split_block` options: ifeval::["{plugincode}" == "exportpdf"] [source,js] @@ -11,11 +11,12 @@ tinymce.init({ plugins: 'exportpdf', toolbar: 'exportpdf', pagebreak_separator: '
', + pagebreak_split_block: true, // ... other configuration options }); ---- -For DOCX exports, the page breaks will be converted to Word-compatible page breaks. +For PDF exports, ensure your content includes proper page break elements that will be converted to PDF page breaks. endif::[] ifeval::["{plugincode}" != "exportpdf"] @@ -27,10 +28,11 @@ tinymce.init({ plugins: 'exportword', toolbar: 'exportword', pagebreak_separator: '
', + 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. +For DOCX exports, the page breaks will be converted to Word-compatible page breaks. endif::[] ==== \ No newline at end of file