Skip to content

Commit d2078f2

Browse files
DOC-3190: Update Vuejs public documents. (#3722)
* DOC-3190: Update Vuejs public documents. * DOC-3190: fix number list rendering issue. * DOC-3190: Update and configure ifeval blocks to seperate api vs licensekey ref. * Update modules/ROOT/partials/integrations/vue-quick-start.adoc * Update modules/ROOT/partials/integrations/vue-tech-ref.adoc * DOC-3190: Replace your-api-key with no-api-key. * DOC-3190: Update warning message for no-api-key. * DOC-3190: Replace warning message for no-api-key. * Update modules/ROOT/partials/integrations/vue-quick-start.adoc Co-authored-by: Mitchell Crompton <[email protected]> * Update modules/ROOT/partials/integrations/vue-quick-start.adoc Co-authored-by: Mitchell Crompton <[email protected]> * DOC-3190: Fix incorrect naming for file. --------- Co-authored-by: Mitchell Crompton <[email protected]>
1 parent 32ee70c commit d2078f2

File tree

7 files changed

+147
-100
lines changed

7 files changed

+147
-100
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::[]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ The editor accepts the following properties:
107107
></editor>
108108
----
109109

110-
None of the configuration properties are *required* for `+tinymce-angular+` to work. Specify a {cloudname} API key using `+apiKey+` to remove the `+This domain is not registered...+` warning message.
110+
None of the configuration properties are *required* for `+tinymce-angular+` to work. Specify a {cloudname} API key using `+apiKey+` to remove the "A valid API key is required to continue using TinyMCE. Please alert the admin to check the current API key. Click here to learn more." warning message.
111111

112112
[[apikey]]
113113
=== `+apiKey+`
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}].
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: 120 additions & 41 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/bundling-integrations-not-recommended-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,30 +30,35 @@ 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
----
57+
+
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_.
5260

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_.
54-
61+
+
5562
* Follow the prompts and type `+tinymce-vue-demo+` as the project name.
5663
. Change into the newly created directory.
5764
+
@@ -61,47 +68,47 @@ cd tinymce-vue-demo
6168
----
6269

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

6673
* For Vue.js 3.x users:
6774
+
6875
[source,sh]
6976
----
70-
npm install --save tinymce "@tinymce/tinymce-vue@^5"
77+
npm install tinymce "@tinymce/tinymce-vue"
7178
----
7279

7380
* For Vue.js 2.x users:
7481
+
7582
[source,sh]
7683
----
77-
npm install --save tinymce "@tinymce/tinymce-vue@^3"
84+
npm install tinymce "@tinymce/tinymce-vue@^3"
7885
----
7986

8087
endif::[]
8188
ifeval::["{productSource}" != "package-manager"]
8289

83-
. Install the `+tinymce-vue+` package and save it to your `+package.json+` with `+--save+`.
90+
. Install the `+tinymce-vue+` package.
8491
* For Vue.js 3.x users:
8592
+
8693
[source,sh]
8794
----
88-
npm install --save "@tinymce/tinymce-vue@^5"
95+
npm install "@tinymce/tinymce-vue"
8996
----
9097
* For Vue.js 2.x users:
9198
+
9299
[source,sh]
93100
----
94-
npm install --save "@tinymce/tinymce-vue@^3"
101+
npm install "@tinymce/tinymce-vue@^3"
95102
----
96103

97104
endif::[]
98105

99106
. 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.
107+
.. Add a {productname} configuration to the `+<template>+` using the `+<editor>+` tag.
101108
.. Add `+import Editor from '@tinymce/tinymce-vue'+` to the start of the `+<script>+`.
102109
+
103-
For example:
104-
+
110+
ifeval::["{productSource}" == "cloud"]
111+
.For example:
105112
[source,jsx]
106113
----
107114
<script setup>
@@ -111,10 +118,13 @@ import Editor from '@tinymce/tinymce-vue'
111118
<template>
112119
<main id="sample">
113120
<img alt="Vue logo" class="logo" src="./assets/logo.svg" width="125" height="125" />
114-
<Editor
115-
api-key="no-api-key"
121+
<editor
122+
id="uuid"
123+
apiKey="no-api-key"
116124
:init="{
117-
plugins: 'lists link image table code help wordcount'
125+
plugins: 'advlist anchor autolink charmap code fullscreen help image insertdatetime link lists media preview searchreplace table visualblocks wordcount',
126+
toolbar: 'undo redo | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
127+
height: 500,
118128
}"
119129
/>
120130
</main>
@@ -136,27 +146,103 @@ import Editor from '@tinymce/tinymce-vue'
136146
}
137147
</style>
138148
----
139-
140-
ifeval::["{productSource}" == "cloud"]
141-
. Include the `+api-key+` option in the editor element and include your link:{accountsignup}/[{cloudname} API key].
142-
+
143-
Such as:
149+
. Include the `+api-key+` option in the editor element and include your link:{accountsignup}/[{cloudname} API key]. Such as:
144150
+
145151
[source,html]
146152
----
147-
<Editor api-key='your-api-key' :init="{ /* your other settings */ }" />
153+
<editor api-key='no-api-key' :init="{ /* your other settings */ }" />
148154
----
149155
endif::[]
150156
ifeval::["{productSource}" == "package-manager"]
151-
. Bundle {productname} with the Vue.js application using a module loader (such as Webpack).
152157
+
158+
.For example:
159+
[source,jsx]
160+
----
161+
<script setup>
162+
import Editor from '@tinymce/tinymce-vue'
163+
</script>
164+
165+
<template>
166+
<main id="sample">
167+
<img alt="Vue logo" class="logo" src="./assets/logo.svg" width="125" height="125" />
168+
<editor
169+
id="uuid"
170+
licenseKey="gpl"
171+
:init="{
172+
plugins: 'advlist anchor autolink charmap code fullscreen help image insertdatetime link lists media preview searchreplace table visualblocks wordcount',
173+
toolbar: 'undo redo | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
174+
height: 500,
175+
}"
176+
/>
177+
</main>
178+
</template>
179+
180+
<style scoped>
181+
.logo {
182+
display: block;
183+
margin: 0 auto 2rem;
184+
}
185+
186+
@media (min-width: 1024px) {
187+
#sample {
188+
display: flex;
189+
flex-direction: column;
190+
place-items: center;
191+
width: 1000px;
192+
}
193+
}
194+
</style>
195+
----
196+
+
197+
. Bundle {productname} with the Vue.js application using a module loader (such as Webpack).
153198
--
154-
:depth: 1
155199
include::partial$integrations/bundling-integration.adoc[]
156200
--
157201
endif::[]
158202
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].
203+
+
204+
.For example:
205+
[source,jsx]
206+
----
207+
<script setup>
208+
import Editor from '@tinymce/tinymce-vue'
209+
</script>
210+
211+
<template>
212+
<main id="sample">
213+
<img alt="Vue logo" class="logo" src="./assets/logo.svg" width="125" height="125" />
214+
<editor
215+
id="uuid"
216+
licenseKey="gpl"
217+
:init="{
218+
plugins: 'advlist anchor autolink charmap code fullscreen help image insertdatetime link lists media preview searchreplace table visualblocks wordcount',
219+
toolbar: 'undo redo | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
220+
height: 500,
221+
}"
222+
/>
223+
</main>
224+
</template>
225+
226+
<style scoped>
227+
.logo {
228+
display: block;
229+
margin: 0 auto 2rem;
230+
}
231+
232+
@media (min-width: 1024px) {
233+
#sample {
234+
display: flex;
235+
flex-direction: column;
236+
place-items: center;
237+
width: 1000px;
238+
}
239+
}
240+
</style>
241+
----
242+
+
243+
. {productname} can be self-hosted by either:
244+
** xref:deploying-tinymce-independent.adoc[Deploying {productname} independent of the Vue.js application],
245+
** xref:zip-install.adoc[{productname} .zip deployments].
160246

161247
* [[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.
162248
+
@@ -167,14 +253,7 @@ To use an independent deployment of {productname}, add a script to either the `<
167253
<script src="/path/to/tinymce.min.js"></script>
168254
----
169255
+
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-
--
256+
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`.
178257
endif::[]
179258

180259
. Test the application using the Node.js development server.
@@ -185,16 +264,16 @@ endif::[]
185264
npm run dev
186265
----
187266

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

190269
== Deploying the application to a HTTP server
191270

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].
271+
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].
193272

194273
== Next Steps
195274

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

0 commit comments

Comments
 (0)