From cb7a527a3885fa0f0d305c43b3a8905c8a6b64e8 Mon Sep 17 00:00:00 2001 From: Karl Kemister-Sheppard Date: Mon, 12 May 2025 14:47:48 +1000 Subject: [PATCH 01/11] DOC-3190: Update Vuejs public documents. --- .../integrations/angular-quick-start.adoc | 1 - ...-integrations-not-reccomended-message.adoc | 1 + .../integrations/bundling-integration.adoc | 43 +----------- .../integrations/vue-quick-start.adoc | 67 ++++++++++--------- .../partials/integrations/vue-tech-ref.adoc | 29 +++++--- .../webcomponent-quick-start.adoc | 1 - 6 files changed, 57 insertions(+), 85 deletions(-) create mode 100644 modules/ROOT/partials/integrations/bunding-integrations-not-reccomended-message.adoc diff --git a/modules/ROOT/partials/integrations/angular-quick-start.adoc b/modules/ROOT/partials/integrations/angular-quick-start.adoc index 76d2c8b6b4..f0d6bd20a8 100644 --- a/modules/ROOT/partials/integrations/angular-quick-start.adoc +++ b/modules/ROOT/partials/integrations/angular-quick-start.adoc @@ -143,7 +143,6 @@ To use an independent deployment of {productname}, add a script to either the `+ * Bundling {productname} with the Angular application using a module loader (such as Webpack). + -- -:depth: 2 include::partial$integrations/bundling-integration.adoc[] -- endif::[] diff --git a/modules/ROOT/partials/integrations/bunding-integrations-not-reccomended-message.adoc b/modules/ROOT/partials/integrations/bunding-integrations-not-reccomended-message.adoc new file mode 100644 index 0000000000..92923c1e9d --- /dev/null +++ b/modules/ROOT/partials/integrations/bunding-integrations-not-reccomended-message.adoc @@ -0,0 +1 @@ +IMPORTANT: {companyname} does not recommend bundling `tinymce` and `{packageName}` with a module loader. Bundling these packages can be complex and error prone. \ No newline at end of file diff --git a/modules/ROOT/partials/integrations/bundling-integration.adoc b/modules/ROOT/partials/integrations/bundling-integration.adoc index 9fe62b8136..373aac1f34 100644 --- a/modules/ROOT/partials/integrations/bundling-integration.adoc +++ b/modules/ROOT/partials/integrations/bundling-integration.adoc @@ -1,24 +1,3 @@ -ifeval::[{depth} == 1] - -IMPORTANT: {companyname} does not recommend bundling `tinymce` and `{packageName}` with a module loader. Bundling these packages can be complex and error prone. - -To bundle {productname} using a module loader (such as Webpack, Rollup, or Browserify), import or require the `tinymce` package, followed by the `{packageName}` package, then the other required {productname}-related imports. - -Example of bundling: - -[source,js,subs="attributes+"] ----- -/* Add the {packageName} wrapper to the bundle */ -import { Editor } from '@tinymce/{packageName}'; -/* For instructions on bundling TinyMCE, see the Bundling TinyMCE documentation. */ ----- - -For instructions on bundling {productname}, see: xref:introduction-to-bundling-tinymce.adoc[Bundling {productname}]. - - -endif::[] -ifeval::[{depth} == 2] - IMPORTANT: {companyname} does not recommend bundling `tinymce` and `{packageName}` with a module loader. Bundling these packages can be complex and error prone. To bundle {productname} using a module loader (such as Webpack, Rollup, or Browserify), import or require the `tinymce` package, followed by the `{packageName}` package, then the other required {productname}-related imports. @@ -32,24 +11,4 @@ import { Editor } from '@tinymce/{packageName}'; /* For instructions on bundling TinyMCE, see the Bundling TinyMCE documentation. */ ---- -For instructions on bundling {productname}, see: xref:introduction-to-bundling-tinymce.adoc[Bundling {productname}]. - -endif::[] -ifndef::depth[] - -IMPORTANT: {companyname} does not recommend bundling `tinymce` and `{packageName}` with a module loader. Bundling these packages can be complex and error prone. - -To bundle {productname} using a module loader (such as Webpack, Rollup, or Browserify), import or require the `tinymce` package, followed by the `{packageName}` package, then the other required {productname}-related imports. - -Example of bundling: - -[source,js,subs="attributes+"] ----- -/* Add the {packageName} wrapper to the bundle */ -import { Editor } from '@tinymce/{packageName}'; -/* For instructions on bundling TinyMCE, see the Bundling TinyMCE documentation. */ ----- - -For instructions on bundling {productname}, see: xref:introduction-to-bundling-tinymce.adoc[Bundling {productname}]. - -endif::[] +For instructions on bundling {productname}, see: xref:introduction-to-bundling-tinymce.adoc[Bundling {productname}]. \ No newline at end of file diff --git a/modules/ROOT/partials/integrations/vue-quick-start.adoc b/modules/ROOT/partials/integrations/vue-quick-start.adoc index a7471b769d..df87b832f7 100644 --- a/modules/ROOT/partials/integrations/vue-quick-start.adoc +++ b/modules/ROOT/partials/integrations/vue-quick-start.adoc @@ -1,15 +1,17 @@ :packageName: tinymce-vue -The https://github.com/tinymce/tinymce-vue[Official {productname} Vue.js component] integrates {productname} into Vue.js projects. This procedure creates a https://cli.vuejs.org/guide/creating-a-project.html#vue-create[basic Vue.js application] containing a {productname} editor. +The link:https://github.com/tinymce/tinymce-vue[Official {productname} Vue.js component] integrates {productname} into Vue.js projects, providing a powerful WYSIWYG editor within the Vue ecosystem. This procedure creates a link:https://cli.vuejs.org/guide/creating-a-project.html#vue-create[basic Vue.js application] containing a {productname} editor. Version 4 and later of the `+tinymce-vue+` package supports Vue.js 3.x, but does not support Vue.js 2.x. For Vue.js 2.x applications, use `+tinymce-vue+` version 3. +include::partial$integrations/bunding-integrations-not-reccomended-message.adoc[] + [[tinymce-vuejs-integration-live-examples]] == TinyMCE Vue.js integration live examples For examples of the {productname} Vue.js 3.x integration: -. Clone the `+tinymce/tinymce-vue+` GitHub repository. For example: +. Clone the `+tinymce/tinymce-vue+` link:https://github.com/tinymce/tinymce-vue[GitHub repository]. For example: + [source,sh] ---- @@ -28,29 +30,33 @@ yarn install yarn demo ---- -The `+tinymce-vue+` demo is now running. Visit: http://localhost:3001. +The `+tinymce-vue+` demo is now running. Visit: link:http://localhost:3001[http://localhost:3001]. == Prerequisites -This procedure requires https://nodejs.org/[Node.js (and npm)]. +This procedure requires: + +* link:https://nodejs.org/en/download/[Node.js LTS] (recommended). +* link:https://cli.vuejs.org/[Vue CLI] (optional). == Procedure -. Create a new Vue project named `tinymce-vue-demo` using the https://github.com/vuejs/create-vue[Create Vue Tool]. +. Create a new Vue project named `tinymce-vue-demo` using the link:https://github.com/vuejs/create-vue[Create Vue Tool]. * From a command line or command prompt create a Vue.js 3.x project: `+tinymce-vue-demo+`. + [source,sh] ---- npm create vue@3 ---- -* If you need to create a Vue.js 2.x projects instead: +* If a Vue.js 2.x project is required instead use: + [source,sh] ---- npm create vue@2 ---- -NOTE: As per the https://vuejs.org/about/faq.html#what-s-the-difference-between-vue-2-and-vue-3[Vue FAQ], _Vue 2 will reach End of Life by the end of 2023_. +[NOTE] +As per the link:https://vuejs.org/about/faq.html#what-s-the-difference-between-vue-2-and-vue-3[Vue FAQ], _Vue 2 will reach End of Life by the end of 2023_. * Follow the prompts and type `+tinymce-vue-demo+` as the project name. . Change into the newly created directory. @@ -61,43 +67,43 @@ cd tinymce-vue-demo ---- ifeval::["{productSource}" == "package-manager"] -. Install the `+tinymce+` and `+tinymce-vue+` packages and save them to your `+package.json+` with `+--save+`. +. Install the `+tinymce+` and `+tinymce-vue+` packages. * For Vue.js 3.x users: + [source,sh] ---- -npm install --save tinymce "@tinymce/tinymce-vue@^5" +npm install tinymce "@tinymce/tinymce-vue" ---- * For Vue.js 2.x users: + [source,sh] ---- -npm install --save tinymce "@tinymce/tinymce-vue@^3" +npm install tinymce "@tinymce/tinymce-vue@^3" ---- endif::[] ifeval::["{productSource}" != "package-manager"] -. Install the `+tinymce-vue+` package and save it to your `+package.json+` with `+--save+`. +. Install the `+tinymce-vue+` package. * For Vue.js 3.x users: + [source,sh] ---- -npm install --save "@tinymce/tinymce-vue@^5" +npm install "@tinymce/tinymce-vue" ---- * For Vue.js 2.x users: + [source,sh] ---- -npm install --save "@tinymce/tinymce-vue@^3" +npm install "@tinymce/tinymce-vue@^3" ---- endif::[] . Using a text editor, open `+/path/to/tinymce-vue-demo/src/App.vue+`. -.. Add a {productname} configuration to the `+