Skip to content

Commit 2a64971

Browse files
committed
DOC-3190: Update and configure ifeval blocks to seperate api vs licensekey ref.
1 parent f4255ab commit 2a64971

File tree

1 file changed

+88
-13
lines changed

1 file changed

+88
-13
lines changed

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

Lines changed: 88 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ ifeval::["{productSource}" == "package-manager"]
7474
+
7575
[source,sh]
7676
----
77-
npm install tinymce "@tinymce/tinymce-vue"
77+
npm install tinymce "@tinymce/tinymce-vue"
7878
----
7979

8080
* For Vue.js 2.x users:
8181
+
8282
[source,sh]
8383
----
84-
npm install tinymce "@tinymce/tinymce-vue@^3"
84+
npm install tinymce "@tinymce/tinymce-vue@^3"
8585
----
8686

8787
endif::[]
@@ -92,13 +92,13 @@ ifeval::["{productSource}" != "package-manager"]
9292
+
9393
[source,sh]
9494
----
95-
npm install "@tinymce/tinymce-vue"
95+
npm install "@tinymce/tinymce-vue"
9696
----
9797
* For Vue.js 2.x users:
9898
+
9999
[source,sh]
100100
----
101-
npm install "@tinymce/tinymce-vue@^3"
101+
npm install "@tinymce/tinymce-vue@^3"
102102
----
103103

104104
endif::[]
@@ -107,8 +107,8 @@ endif::[]
107107
.. Add a {productname} configuration to the `+<template>+` using the `+<editor>+` tag.
108108
.. Add `+import Editor from '@tinymce/tinymce-vue'+` to the start of the `+<script>+`.
109109
+
110-
For example:
111-
+
110+
ifeval::["{productSource}" == "cloud"]
111+
.For example:
112112
[source,jsx]
113113
----
114114
<script setup>
@@ -120,7 +120,7 @@ import Editor from '@tinymce/tinymce-vue'
120120
<img alt="Vue logo" class="logo" src="./assets/logo.svg" width="125" height="125" />
121121
<editor
122122
id="uuid"
123-
licenseKey="gpl"
123+
apiKey="no-api-key"
124124
:init="{
125125
plugins: 'advlist anchor autolink charmap code fullscreen help image insertdatetime link lists media preview searchreplace table visualblocks wordcount',
126126
toolbar: 'undo redo | styles | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
@@ -146,25 +146,100 @@ import Editor from '@tinymce/tinymce-vue'
146146
}
147147
</style>
148148
----
149-
150-
ifeval::["{productSource}" == "cloud"]
151-
. Include the `+api-key+` option in the editor element and include your link:{accountsignup}/[{cloudname} API key].
152-
+
153-
Such as:
149+
. Include the `+api-key+` option in the editor element and include your link:{accountsignup}/[{cloudname} API key]. Such as:
154150
+
155151
[source,html]
156152
----
157153
<editor api-key='your-api-key' :init="{ /* your other settings */ }" />
158154
----
159155
endif::[]
160156
ifeval::["{productSource}" == "package-manager"]
161-
. Bundle {productname} with the Vue.js application using a module loader (such as Webpack).
162157
+
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).
163198
--
164199
include::partial$integrations/bundling-integration.adoc[]
165200
--
166201
endif::[]
167202
ifeval::["{productSource}" == "zip"]
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+
+
168243
. {productname} can be self-hosted by either:
169244
** xref:deploying-tinymce-independent[Deploying {productname} independent of the Vue.js application],
170245
** xref:zip-install.adoc[{productname} .zip deployments].

0 commit comments

Comments
 (0)