Skip to content

Commit ba7e8e4

Browse files
committed
DOC-3184: Update Svelt public documentation.
1 parent d450064 commit ba7e8e4

File tree

2 files changed

+43
-19
lines changed

2 files changed

+43
-19
lines changed

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

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
The https://github.com/tinymce/tinymce-svelte[Official {productname} Svelte component] integrates {productname} into https://svelte.dev/[Svelte applications]. This procedure creates a basic Svelte application containing a {productname} editor.
1+
The https://github.com/tinymce/tinymce-svelte[Official {productname} Svelte component] integrates {productname} into https://svelte.dev/[Svelte applications].
2+
Creates a basic Svelte application containing a {productname} editor.
23

3-
For examples of the {productname} integration, visit https://tinymce.github.io/tinymce-svelte/[the tinymce-svelte storybook].
4+
For examples of the {productname} integration, visit the https://tinymce.github.io/tinymce-svelte/[tinymce-svelte storybook].
45

56
== Prerequisites
67

7-
This procedure requires https://nodejs.org/[Node.js (and npm)].
8+
Requires https://nodejs.org/[Node.js (and npm)].
89

910
== Procedure
1011

@@ -14,16 +15,22 @@ This procedure requires https://nodejs.org/[Node.js (and npm)].
1415
----
1516
npm create vite@5 tinymce-svelte-demo -- --template svelte
1617
----
17-
. Change to the newly created directory.
18+
. Change to the project directory.
1819
+
1920
[source,sh]
2021
----
2122
cd tinymce-svelte-demo
2223
----
24+
. Install project dependencies.
25+
+
26+
[source,sh]
27+
----
28+
npm install
29+
----
2330

2431
ifeval::["{productSource}" == "package-manager"]
2532

26-
. Install the `+tinymce+` and the `+tinymce-svelte+` editor component, such as:
33+
. Install the `+tinymce+` and `+tinymce-svelte+` packages:
2734
+
2835
[source,sh,subs="attributes+"]
2936
----
@@ -33,7 +40,7 @@ npm install tinymce@^{productmajorversion} @tinymce/tinymce-svelte
3340
endif::[]
3441
ifeval::["{productSource}" != "package-manager"]
3542

36-
. Install the `+tinymce-svelte+` editor component, such as:
43+
. Install the `+tinymce-svelte+` editor component:
3744
+
3845
[source,sh]
3946
----
@@ -74,16 +81,23 @@ let conf = {
7481
</main>
7582
----
7683

84+
[NOTE]
85+
====
86+
Replace `your-tiny-cloud-api-key` with a valid {cloudname} API key.
87+
88+
include::partial$misc/get-an-api-key.adoc[]
89+
====
90+
7791
endif::[]
7892
ifeval::["{productSource}" == "package-manager"]
7993

80-
. Install the `+vite-plugin-static-copy+` development dependency, such as:
94+
. Install the `+vite-plugin-static-copy+` development dependency:
8195
+
8296
[source,sh]
8397
----
8498
npm install -D vite-plugin-static-copy
8599
----
86-
. Open `+vite.config.js+` and configure the `+vite-plugin-static-copy+` plugin to copy {productname} to the `+public/+` directory, such as:
100+
. Configure `+vite.config.js+` to copy {productname} to the `+public/+` directory:
87101
+
88102
[source,js]
89103
----
@@ -133,6 +147,8 @@ let conf = {
133147
/>
134148
</main>
135149
----
150+
+
151+
. Update the `+licenseKey+` option in the editor element and include your xref:license-key.adoc[License Key].
136152

137153
endif::[]
138154
ifeval::["{productSource}" == "zip"]
@@ -167,22 +183,27 @@ let conf = {
167183
/>
168184
</main>
169185
----
186+
+
187+
. Update the `+licenseKey+` option in the editor element and include your xref:license-key.adoc[License Key].
170188

171189
endif::[]
172190

173-
. Test the application using the Node.js development server.
174-
* To start the development server, in the project's root directory, run:
191+
== Run the Application
192+
193+
Test the application using the Node.js development server.
194+
195+
. To start the development server:
175196
+
176197
[source,sh]
177198
----
178199
npm run dev
179200
----
180201
+
181-
* To stop the development server, select on the command line or command prompt and press _Ctrl+C_.
202+
. To stop the development server, use `+Ctrl+C+` in the terminal or command prompt.
182203

183204
== Next Steps
184205

185-
* For examples of the {productname} integration, see: https://tinymce.github.io/tinymce-svelte/[the tinymce-svelte storybook].
186-
* For information on customizing, see:
187-
** xref:basic-setup.adoc[{productname} basic setup].
188-
** xref:svelte-ref.adoc[The {productname} Svelte integration technical reference].
206+
* See the following for additional information:
207+
** https://tinymce.github.io/tinymce-svelte/[tinymce-svelte storybook]
208+
** xref:basic-setup.adoc[{productname} basic setup]
209+
** xref:svelte-ref.adoc[{productname} Svelte integration technical reference]

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ The `+tinymce-svelte+` `+Editor+` component accepts the following properties:
3838

3939
{cloudname} API key. Required for deployments using the {cloudname} to provide the {productname} editor.
4040

41+
include::partial$misc/get-an-api-key.adoc[]
42+
4143
*Type:* `+String+`
4244

4345
*Default value:* `+'no-api-key'+`
@@ -51,12 +53,12 @@ The `+tinymce-svelte+` `+Editor+` component accepts the following properties:
5153
/>
5254
----
5355

54-
[[licenseKey]]
56+
[[licensekey]]
5557
=== `+licenseKey+`
5658

5759
{cloudname} License key.
5860

59-
Use this when self-hosting {productname} instead of loading from {cloudname}. For more information, see: xref:license-key.adoc[License Key].
61+
Use this option when self-hosting {productname} instead of loading from {cloudname}. For more information, see: xref:license-key.adoc[License Key].
6062

6163
*Type:* `+String+`
6264

@@ -100,7 +102,7 @@ Specified an Id for the editor. Used for retrieving the editor instance using th
100102

101103
*Type:* `+String+`
102104

103-
*Default value:* Automatically generated https://tools.ietf.org/html/rfc4122[UUID]
105+
*Default value:* Automatically generated link:https://tools.ietf.org/html/rfc4122[UUID]
104106

105107
==== Example using `+id+`
106108

@@ -114,7 +116,7 @@ Specified an Id for the editor. Used for retrieving the editor instance using th
114116
[[inline]]
115117
=== `+inline+`
116118

117-
Set the editor to inline mode.
119+
Sets the editor to use inline mode.
118120

119121
*Type:* `+Boolean+`
120122

@@ -243,6 +245,7 @@ When the handler is called (*handlerFunction* in this example), it is called wit
243245

244246
`+editor+`:: A reference to the editor.
245247

248+
[TIP]
246249
Ensure event names are specified in lower-case (event names are case-sensitive).
247250

248251
The following events are available:

0 commit comments

Comments
 (0)