From 8423d8258b67ecbf5390350501cb785645c9e044 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Tue, 3 Mar 2026 12:51:51 +1000 Subject: [PATCH 1/4] Docs: DOC-1923 - Correct Laravel chapter to use Vite instead of Laravel Mix --- .../integrations/laravel-quick-start.adoc | 58 +++++++++++++++---- 1 file changed, 47 insertions(+), 11 deletions(-) diff --git a/modules/ROOT/partials/integrations/laravel-quick-start.adoc b/modules/ROOT/partials/integrations/laravel-quick-start.adoc index 9892c1d6d6..7086126448 100644 --- a/modules/ROOT/partials/integrations/laravel-quick-start.adoc +++ b/modules/ROOT/partials/integrations/laravel-quick-start.adoc @@ -11,7 +11,7 @@ ifeval::["{productSource}" == "zip"] :packageSource: TinyMCE .zip package endif::[] -https://laravel.com/[Laravel] is a scaleable web application framework built on PHP. This guide assists with adding {productname} from the {packageSource} to pages or views in Laravel. The example Laravel project created in this procedure is based on the Laravel project documented in the Laravel Docs, under https://laravel.com/docs/8.x/installation#installation-via-composer[Installation Via Composer]. The guide will create two blades: one for the JavaScript and another for the editor placeholder, to reflect how {productname} should be used in production environments. +https://laravel.com/[Laravel] is a scaleable web application framework built on PHP. This guide assists with adding {productname} from the {packageSource} to pages or views in Laravel. The example Laravel project created in this procedure is based on the Laravel project documented in the Laravel Docs, under https://laravel.com/docs/11.x/installation#installation-via-composer[Installation Via Composer]. The guide will create two blades: one for the JavaScript and another for the editor placeholder, to reflect how {productname} should be used in production environments. == Requirements @@ -40,7 +40,7 @@ cd my-example-app ifeval::["{productSource}" != "cloud"] -. Install the required Node.js components, including https://laravel.com/docs/8.x/mix[Laravel Mix]: +. Install the required Node.js components, including https://laravel.com/docs/11.x/vite[Vite]: + [source,sh] ---- @@ -56,13 +56,31 @@ ifeval::["{productSource}" == "composer"] ---- composer require tinymce/tinymce ---- -. Add a Laravel Mix task to copy {productname} to the public files when Mix is run, such as: +. Add a Vite task to copy {productname} to the public files when the build runs. Install the static copy plugin and configure Vite: + -_File:_ `+webpack.mix.js+` +[source,sh] +---- +npm install -D vite-plugin-static-copy +---- ++ +_File:_ `+vite.config.js+` + [source,js] ---- -mix.copyDirectory('vendor/tinymce/tinymce', 'public/js/tinymce'); +import { defineConfig } from 'vite'; +import laravel from 'laravel-vite-plugin'; +import { viteStaticCopy } from 'vite-plugin-static-copy'; + +export default defineConfig({ + plugins: [ + laravel(['resources/css/app.css', 'resources/js/app.js']), + viteStaticCopy({ + targets: [ + { src: 'vendor/tinymce/tinymce', dest: 'js' } + ] + }) + ] +}); ---- endif::[] @@ -76,28 +94,46 @@ include::partial$integrations/download-tinymce-zip.adoc[] ---- unzip ../tinymce_latest.zip -d resources/js ---- -. Add a Laravel Mix task to copy {productname} to the public files when Mix is run, such as: +. Add a Vite task to copy {productname} to the public files when the build runs. Install the static copy plugin and configure Vite: + -_File:_ `+webpack.mix.js+` +[source,sh] +---- +npm install -D vite-plugin-static-copy +---- ++ +_File:_ `+vite.config.js+` + [source,js] ---- -mix.copyDirectory('resources/js/tinymce/js/tinymce', 'public/js/tinymce'); +import { defineConfig } from 'vite'; +import laravel from 'laravel-vite-plugin'; +import { viteStaticCopy } from 'vite-plugin-static-copy'; + +export default defineConfig({ + plugins: [ + laravel(['resources/css/app.css', 'resources/js/app.js']), + viteStaticCopy({ + targets: [ + { src: 'resources/js/tinymce/js/tinymce', dest: 'js' } + ] + }) + ] +}); ---- endif::[] ifeval::["{productSource}" != "cloud"] -. Run Laravel Mix to copy {productname} to the `+public/js/+` directory: +. Run Vite to copy {productname} to the `+public/js/+` directory: + [source,sh] ---- -npx mix +npm run build ---- endif::[] -. Create a new reusable https://laravel.com/docs/8.x/blade#components[component (`+blade.php+`)] for the {productname} configuration, such as: +. Create a new reusable https://laravel.com/docs/11.x/blade#components[component (`+blade.php+`)] for the {productname} configuration, such as: + [source,sh] ---- From e796abfb902099f39b9a9249a85e243442c0699b Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Tue, 3 Mar 2026 12:55:04 +1000 Subject: [PATCH 2/4] Docs: DOC-1923 - Update Laravel docs links to 12.x --- modules/ROOT/partials/integrations/laravel-quick-start.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/partials/integrations/laravel-quick-start.adoc b/modules/ROOT/partials/integrations/laravel-quick-start.adoc index 7086126448..72a3602287 100644 --- a/modules/ROOT/partials/integrations/laravel-quick-start.adoc +++ b/modules/ROOT/partials/integrations/laravel-quick-start.adoc @@ -11,7 +11,7 @@ ifeval::["{productSource}" == "zip"] :packageSource: TinyMCE .zip package endif::[] -https://laravel.com/[Laravel] is a scaleable web application framework built on PHP. This guide assists with adding {productname} from the {packageSource} to pages or views in Laravel. The example Laravel project created in this procedure is based on the Laravel project documented in the Laravel Docs, under https://laravel.com/docs/11.x/installation#installation-via-composer[Installation Via Composer]. The guide will create two blades: one for the JavaScript and another for the editor placeholder, to reflect how {productname} should be used in production environments. +https://laravel.com/[Laravel] is a scaleable web application framework built on PHP. This guide assists with adding {productname} from the {packageSource} to pages or views in Laravel. The example Laravel project created in this procedure is based on the Laravel project documented in the Laravel Docs, under https://laravel.com/docs/12.x/installation#installation-via-composer[Installation Via Composer]. The guide will create two blades: one for the JavaScript and another for the editor placeholder, to reflect how {productname} should be used in production environments. == Requirements @@ -40,7 +40,7 @@ cd my-example-app ifeval::["{productSource}" != "cloud"] -. Install the required Node.js components, including https://laravel.com/docs/11.x/vite[Vite]: +. Install the required Node.js components, including https://laravel.com/docs/12.x/vite[Vite]: + [source,sh] ---- @@ -133,7 +133,7 @@ npm run build endif::[] -. Create a new reusable https://laravel.com/docs/11.x/blade#components[component (`+blade.php+`)] for the {productname} configuration, such as: +. Create a new reusable https://laravel.com/docs/12.x/blade#components[component (`+blade.php+`)] for the {productname} configuration, such as: + [source,sh] ---- From e31e805cea14d7322e0d37c2275208602436e5b8 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Tue, 3 Mar 2026 12:59:33 +1000 Subject: [PATCH 3/4] Docs: DOC-1923 - Fix asset path for Vite build output (public/build/js) --- modules/ROOT/partials/integrations/laravel-quick-start.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/partials/integrations/laravel-quick-start.adoc b/modules/ROOT/partials/integrations/laravel-quick-start.adoc index 72a3602287..4164d9a504 100644 --- a/modules/ROOT/partials/integrations/laravel-quick-start.adoc +++ b/modules/ROOT/partials/integrations/laravel-quick-start.adoc @@ -3,11 +3,11 @@ ifeval::["{productSource}" == "cloud"] :packageSource: {cloudname} endif::[] ifeval::["{productSource}" == "composer"] -:scriptsource: {{ asset('js/tinymce/tinymce.min.js') }} +:scriptsource: {{ asset('build/js/tinymce/tinymce.min.js') }} :packageSource: https://packagist.org/packages/tinymce/tinymce[TinyMCE Composer package] endif::[] ifeval::["{productSource}" == "zip"] -:scriptsource: {{ asset('js/tinymce/tinymce.min.js') }} +:scriptsource: {{ asset('build/js/tinymce/tinymce.min.js') }} :packageSource: TinyMCE .zip package endif::[] @@ -124,7 +124,7 @@ export default defineConfig({ endif::[] ifeval::["{productSource}" != "cloud"] -. Run Vite to copy {productname} to the `+public/js/+` directory: +. Run Vite to copy {productname} to the `+public/build/js/+` directory: + [source,sh] ---- From 3b649d1bb8b7a1ffadb816cd0ed6c95a87657ff5 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Tue, 3 Mar 2026 13:22:04 +1000 Subject: [PATCH 4/4] Docs: Improve PR template with multi-page staging link guidance --- .github/pull_request_template.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 6c105853dd..f4bce87858 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,6 +1,8 @@ **Ticket:** DOC- -**Site:** [Staging branch](https://pr-.tinymce-docs.iad.staging.tiny.cloud/docs/tinymce/8/) +**Site:** `https://pr-PR_NUMBER.tinymce-docs.iad.staging.tiny.cloud/docs/tinymce/latest/PAGE_PATH` – Replace PR_NUMBER (from `gh pr view`) and PAGE_PATH. For shared partials affecting multiple pages, list each: +- [Page 1](https://pr-PR_NUMBER.tinymce-docs.iad.staging.tiny.cloud/docs/tinymce/latest/page-1) +- [Page 2](https://pr-PR_NUMBER.tinymce-docs.iad.staging.tiny.cloud/docs/tinymce/latest/page-2) **Changes:** *