Skip to content

Commit cb7a527

Browse files
committed
DOC-3190: Update Vuejs public documents.
1 parent 791c47b commit cb7a527

File tree

6 files changed

+57
-85
lines changed

6 files changed

+57
-85
lines changed

modules/ROOT/partials/integrations/angular-quick-start.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ To use an independent deployment of {productname}, add a script to either the `+
143143
* Bundling {productname} with the Angular application using a module loader (such as Webpack).
144144
+
145145
--
146-
:depth: 2
147146
include::partial$integrations/bundling-integration.adoc[]
148147
--
149148
endif::[]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
IMPORTANT: {companyname} does not recommend bundling `tinymce` and `{packageName}` with a module loader. Bundling these packages can be complex and error prone.
Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
1-
ifeval::[{depth} == 1]
2-
3-
IMPORTANT: {companyname} does not recommend bundling `tinymce` and `{packageName}` with a module loader. Bundling these packages can be complex and error prone.
4-
5-
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.
6-
7-
Example of bundling:
8-
9-
[source,js,subs="attributes+"]
10-
----
11-
/* Add the {packageName} wrapper to the bundle */
12-
import { Editor } from '@tinymce/{packageName}';
13-
/* For instructions on bundling TinyMCE, see the Bundling TinyMCE documentation. */
14-
----
15-
16-
For instructions on bundling {productname}, see: xref:introduction-to-bundling-tinymce.adoc[Bundling {productname}].
17-
18-
19-
endif::[]
20-
ifeval::[{depth} == 2]
21-
221
IMPORTANT: {companyname} does not recommend bundling `tinymce` and `{packageName}` with a module loader. Bundling these packages can be complex and error prone.
232

243
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}';
3211
/* For instructions on bundling TinyMCE, see the Bundling TinyMCE documentation. */
3312
----
3413

35-
For instructions on bundling {productname}, see: xref:introduction-to-bundling-tinymce.adoc[Bundling {productname}].
36-
37-
endif::[]
38-
ifndef::depth[]
39-
40-
IMPORTANT: {companyname} does not recommend bundling `tinymce` and `{packageName}` with a module loader. Bundling these packages can be complex and error prone.
41-
42-
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.
43-
44-
Example of bundling:
45-
46-
[source,js,subs="attributes+"]
47-
----
48-
/* Add the {packageName} wrapper to the bundle */
49-
import { Editor } from '@tinymce/{packageName}';
50-
/* For instructions on bundling TinyMCE, see the Bundling TinyMCE documentation. */
51-
----
52-
53-
For instructions on bundling {productname}, see: xref:introduction-to-bundling-tinymce.adoc[Bundling {productname}].
54-
55-
endif::[]
14+
For instructions on bundling {productname}, see: xref:introduction-to-bundling-tinymce.adoc[Bundling {productname}].

modules/ROOT/partials/integrations/vue-quick-start.adoc

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
:packageName: tinymce-vue
22

3-
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.
3+
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.
44

55
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.
66

7+
include::partial$integrations/bunding-integrations-not-reccomended-message.adoc[]
8+
79
[[tinymce-vuejs-integration-live-examples]]
810
== TinyMCE Vue.js integration live examples
911

1012
For examples of the {productname} Vue.js 3.x integration:
1113

12-
. Clone the `+tinymce/tinymce-vue+` GitHub repository. For example:
14+
. Clone the `+tinymce/tinymce-vue+` link:https://github.com/tinymce/tinymce-vue[GitHub repository]. For example:
1315
+
1416
[source,sh]
1517
----
@@ -28,29 +30,33 @@ yarn install
2830
yarn demo
2931
----
3032

31-
The `+tinymce-vue+` demo is now running. Visit: http://localhost:3001.
33+
The `+tinymce-vue+` demo is now running. Visit: link:http://localhost:3001[http://localhost:3001].
3234

3335
== Prerequisites
3436

35-
This procedure requires https://nodejs.org/[Node.js (and npm)].
37+
This procedure requires:
38+
39+
* link:https://nodejs.org/en/download/[Node.js LTS] (recommended).
40+
* link:https://cli.vuejs.org/[Vue CLI] (optional).
3641

3742
== Procedure
3843

39-
. Create a new Vue project named `tinymce-vue-demo` using the https://github.com/vuejs/create-vue[Create Vue Tool].
44+
. Create a new Vue project named `tinymce-vue-demo` using the link:https://github.com/vuejs/create-vue[Create Vue Tool].
4045
* From a command line or command prompt create a Vue.js 3.x project: `+tinymce-vue-demo+`.
4146
+
4247
[source,sh]
4348
----
4449
npm create vue@3
4550
----
46-
* If you need to create a Vue.js 2.x projects instead:
51+
* If a Vue.js 2.x project is required instead use:
4752
+
4853
[source,sh]
4954
----
5055
npm create vue@2
5156
----
5257

53-
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_.
58+
[NOTE]
59+
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_.
5460

5561
* Follow the prompts and type `+tinymce-vue-demo+` as the project name.
5662
. Change into the newly created directory.
@@ -61,43 +67,43 @@ cd tinymce-vue-demo
6167
----
6268

6369
ifeval::["{productSource}" == "package-manager"]
64-
. Install the `+tinymce+` and `+tinymce-vue+` packages and save them to your `+package.json+` with `+--save+`.
70+
. Install the `+tinymce+` and `+tinymce-vue+` packages.
6571

6672
* For Vue.js 3.x users:
6773
+
6874
[source,sh]
6975
----
70-
npm install --save tinymce "@tinymce/tinymce-vue@^5"
76+
npm install tinymce "@tinymce/tinymce-vue"
7177
----
7278

7379
* For Vue.js 2.x users:
7480
+
7581
[source,sh]
7682
----
77-
npm install --save tinymce "@tinymce/tinymce-vue@^3"
83+
npm install tinymce "@tinymce/tinymce-vue@^3"
7884
----
7985

8086
endif::[]
8187
ifeval::["{productSource}" != "package-manager"]
8288

83-
. Install the `+tinymce-vue+` package and save it to your `+package.json+` with `+--save+`.
89+
. Install the `+tinymce-vue+` package.
8490
* For Vue.js 3.x users:
8591
+
8692
[source,sh]
8793
----
88-
npm install --save "@tinymce/tinymce-vue@^5"
94+
npm install "@tinymce/tinymce-vue"
8995
----
9096
* For Vue.js 2.x users:
9197
+
9298
[source,sh]
9399
----
94-
npm install --save "@tinymce/tinymce-vue@^3"
100+
npm install "@tinymce/tinymce-vue@^3"
95101
----
96102

97103
endif::[]
98104

99105
. Using a text editor, open `+/path/to/tinymce-vue-demo/src/App.vue+`.
100-
.. Add a {productname} configuration to the `+<template>+` using the `+<Editor>+` tag.
106+
.. Add a {productname} configuration to the `+<template>+` using the `+<editor>+` tag.
101107
.. Add `+import Editor from '@tinymce/tinymce-vue'+` to the start of the `+<script>+`.
102108
+
103109
For example:
@@ -111,10 +117,13 @@ import Editor from '@tinymce/tinymce-vue'
111117
<template>
112118
<main id="sample">
113119
<img alt="Vue logo" class="logo" src="./assets/logo.svg" width="125" height="125" />
114-
<Editor
115-
api-key="no-api-key"
120+
<editor
121+
id="uuid"
122+
licenseKey="gpl"
116123
:init="{
117-
plugins: 'lists link image table code help wordcount'
124+
plugins: 'advlist anchor autolink charmap code fullscreen help image insertdatetime link lists media preview searchreplace table visualblocks wordcount',
125+
toolbar: 'undo redo | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
126+
height: 500,
118127
}"
119128
/>
120129
</main>
@@ -144,19 +153,20 @@ Such as:
144153
+
145154
[source,html]
146155
----
147-
<Editor api-key='your-api-key' :init="{ /* your other settings */ }" />
156+
<editor api-key='your-api-key' :init="{ /* your other settings */ }" />
148157
----
149158
endif::[]
150159
ifeval::["{productSource}" == "package-manager"]
151160
. Bundle {productname} with the Vue.js application using a module loader (such as Webpack).
152161
+
153162
--
154-
:depth: 1
155163
include::partial$integrations/bundling-integration.adoc[]
156164
--
157165
endif::[]
158166
ifeval::["{productSource}" == "zip"]
159-
. {productname} can be self-hosted by either: xref:deploying-tinymce-independent[Deploying {productname} independent of the Vue.js application], or xref:bundle[Bundling {productname} with the Vue.js application].
167+
. {productname} can be self-hosted by either:
168+
** xref:deploying-tinymce-independent[Deploying {productname} independent of the Vue.js application],
169+
** xref:zip-install.adoc[{productname} .zip deployments].
160170

161171
* [[deploying-tinymce-independent]] Deploying {productname} independent of the Vue.js application. To use a {productname} instance that has been deployed independent of the Vue.js application, use an HTML `+<script>+` tag.
162172
+
@@ -167,14 +177,7 @@ To use an independent deployment of {productname}, add a script to either the `<
167177
<script src="/path/to/tinymce.min.js"></script>
168178
----
169179
+
170-
To use an independent deployment of {productname} with the example create a Vue.js application, add the script to `/path/to/tinymce-vue-demo/public/index.html`.
171-
172-
* [[bundle]] Bundle {productname} with the Vue.js application using a module loader (such as Webpack).
173-
+
174-
--
175-
:depth: 2
176-
include::partial$integrations/bundling-integration.adoc[]
177-
--
180+
To use an independent deployment of {productname} with the example create a Vue.js application, add the `+<script>+` to `/path/to/tinymce-vue-demo/public/index.html`.
178181
endif::[]
179182

180183
. Test the application using the Node.js development server.
@@ -185,16 +188,16 @@ endif::[]
185188
npm run dev
186189
----
187190

188-
* To stop the development server, select on the command line or command prompt and press _Ctrl+C_.
191+
* To stop the development server, select on the command line or command prompt and press `+Ctrl+C+`.
189192

190193
== Deploying the application to a HTTP server
191194

192-
The application will require further configuration before it can be deployed to a production environment. For information on configuring the application for deployment, see: https://vuejs.org/v2/guide/deployment.html[Vue.js - Production Deployment].
195+
The application will require further configuration before it can be deployed to a production environment. For information on configuring the application for deployment, see: link:https://vuejs.org/v2/guide/deployment.html[Vue.js - Production Deployment].
193196

194197
== Next Steps
195198

196-
* For examples of the {productname} integration, see: https://tinymce.github.io/tinymce-vue/[the tinymce-vue storybook].
199+
* For examples of the {productname} integration, see: link:https://tinymce.github.io/tinymce-vue/[the tinymce-vue storybook].
197200
* For information on customizing:
198201
** {productname} integration, see: xref:vue-ref.adoc[Vue.js framework Technical Reference].
199202
** {productname}, see: xref:basic-setup.adoc[Basic setup].
200-
** The Vue.js application, see: https://vuejs.org/v2/guide/[Vue.js Documentation].
203+
** The Vue.js application, see: link:https://vuejs.org/v2/guide/[Vue.js Documentation].

modules/ROOT/partials/integrations/vue-tech-ref.adoc

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@
2323
[[installing-the-tinymce-vuejs-integration-using-npm]]
2424
== Installing the TinyMCE Vue.js integration using NPM
2525

26-
To install the `+tinymce-vue+` package and save it to your `+package.json+`.
26+
To install the `+tinymce-vue+` package.
2727

2828
* For Vue.js 3.x users:
2929
+
3030
[source,sh]
3131
----
32-
npm install --save "@tinymce/tinymce-vue@^4"
32+
npm install "@tinymce/tinymce-vue"
3333
----
3434
* For Vue.js 2.x users:
3535
+
3636
[source,sh]
3737
----
38-
npm install --save "@tinymce/tinymce-vue@^3"
38+
npm install "@tinymce/tinymce-vue@^3"
3939
----
4040

4141
[[using-the-tinymce-vuejs-integration]]
@@ -77,7 +77,16 @@ var app = new Vue({
7777
+
7878
[source,html]
7979
----
80-
<editor api-key="API_KEY" :init="{plugins: 'wordcount'}" />
80+
<editor
81+
id="uuid"
82+
api-key="your-api-key"
83+
tinymce-script-src="/Users/karl/tinymce/test_apps/test-app-updated-config/node_modules/tinymce/tinymce.min.js"
84+
:init="{
85+
plugins: 'advlist anchor autolink charmap code fullscreen help image insertdatetime link lists media preview searchreplace table visualblocks wordcount',
86+
toolbar: 'undo redo | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
87+
height: 500,
88+
}"
89+
/>
8190
----
8291

8392
[[configuring-the-editor]]
@@ -103,6 +112,7 @@ The editor accepts the following properties:
103112
/>
104113
----
105114

115+
[NOTE]
106116
None of the configuration properties are *required* for `+tinymce-vue+` to work. Specify a {cloudname} API key using `+api-key+` to remove the `+This domain is not registered...+` warning message.
107117

108118
[[api-key]]
@@ -199,7 +209,7 @@ The `+disabled+` property can dynamically switch the editor between a "disabled"
199209
[[id]]
200210
=== `+id+`
201211

202-
An id for the editor. Used for retrieving the editor instance using the `+tinymce.get('ID')+` method.
212+
An `id` for the editor. Used for retrieving the editor instance using the `+tinymce.get('ID')+` method.
203213

204214
*Type:* `+String+`
205215

@@ -288,12 +298,13 @@ For a list of available {productname} events, see: xref:events.adoc#editor-core-
288298

289299
*Default value:* `+'change keyup undo redo'+`.
290300

301+
// ref: https://github.com/tinymce/tinymce-vue/blob/d66bfa9eb6a819a1943431362cf978f7bf56c145/src/main/ts/Utils.ts#L111
291302
==== Example: using `+model-events+`
292303

293304
[source,html]
294305
----
295306
<editor
296-
model-events="change keydown blur focus paste"
307+
model-events="change input undo paste"
297308
/>
298309
----
299310

@@ -378,7 +389,7 @@ For information setting the toolbar for {productname}, see: xref:toolbar-configu
378389
[[tinymce-script-src]]
379390
=== `+tinymce-script-src+`
380391

381-
Use the `+tinymce-script-src+` prop to specify an external version of TinyMCE to lazy load.
392+
Use the `+tinymce-script-src+` prop to specify an external version of {productname} to lazy load from.
382393

383394
*Type:* `+String+`
384395

@@ -401,7 +412,7 @@ The `+v-model+` directive can be used to create a two-way data binding. For exam
401412
<editor v-model="content" />
402413
----
403414

404-
For information on `+v-model+` and form input bindings, see: https://vuejs.org/guide/essentials/forms.html[Vue.js documentation - Form Input Bindings].
415+
For information on `+v-model+` and form input bindings, see: link:https://vuejs.org/guide/essentials/forms.html[Vue.js documentation - Form Input Bindings].
405416

406417
[[event-binding]]
407418
== Event binding
@@ -417,7 +428,7 @@ For older versions of Vue (Vue 2) supported by v3.x, the syntax for event bindin
417428

418429
When the handler is called (*handlerFunction* in this example), it is called with two arguments:
419430

420-
* `+event+` - The TinyMCE event object.
431+
* `+event+` - The {productname} event object.
421432
* `+editor+` - A reference to the editor.
422433

423434
The following events are available:

modules/ROOT/partials/integrations/webcomponent-quick-start.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ npm install tinymce @tinymce/tinymce-webcomponent
4848
. Bundle {productname} with the Web Component application using a module loader (such as Webpack).
4949
+
5050
--
51-
:depth: 1
5251
include::partial$integrations/bundling-integration.adoc[]
5352
--
5453

0 commit comments

Comments
 (0)