Skip to content

Commit 6d07405

Browse files
author
Sorita Heng
committed
revise copy and code examples
1 parent 7ee5f4f commit 6d07405

File tree

2 files changed

+41
-22
lines changed

2 files changed

+41
-22
lines changed

modules/ROOT/partials/docker/spelling-service/spelling-service-installation.adoc

Lines changed: 40 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
== Installation
33

44
[IMPORTANT]
5-
Valid credentials (username and password) are **required** in order to retrieve On-Premises services images from our Docker Registry.
6-
link:https://www.tiny.cloud/contact/[Contact {companyname} Support] to request credentials.
5+
A valid access token is **required** in order to retrieve On-Premises services images from {companyname} Cloud Docker Registry.
6+
link:https://www.tiny.cloud/contact/[Contact {companyname} Support] to request the access token.
77

88
=== Retrieve Docker Image
99

1010
. Log into the {companyname} Cloud Docker Registry:
1111
+
1212
[source, sh, subs="attributes+"]
1313
----
14-
docker login -u tiny -p [password] registry.containers.tiny.cloud
14+
docker login -u tiny -p [access-token] registry.containers.tiny.cloud
1515
----
1616

1717
. Pull the Docker Image from the Docker registry:
@@ -20,6 +20,11 @@ docker login -u tiny -p [password] registry.containers.tiny.cloud
2020
----
2121
docker pull registry.containers.tiny.cloud/spelling-tiny:<VERSION>
2222
----
23+
24+
+
25+
[NOTE]
26+
Currently, the Docker images are only supported on x86-64 (also known as AMD64) architecture processors.
27+
2328
+
2429
Replace `<VERSION>` with `latest` or the specific version number.
2530

@@ -63,22 +68,30 @@ This configuration file requires at least the following information:
6368

6469
* `allowed-origins`: Specifies the domains allowed to communicate with server-side editor features. This is **mandatory** for all server-side components.
6570

66-
By default, the {pluginname} plugin comes with Hunspell dictionaries for link:https://www.tiny.cloud/docs/tinymce/latest/introduction-to-tiny-spellchecker/#supported-languages[supported languages]. For additional configurations, the service supports the following options:
71+
By default, the {pluginname} plugin comes with Hunspell dictionaries for link:https://www.tiny.cloud/docs/tinymce/latest/introduction-to-tiny-spellchecker/#supported-languages[supported languages]. For additional configurations, the service supports the following options in the `application.conf` file:
6772

68-
==== Configure Custom Dictionaries
73+
* `custom-dictionaries-path`: Sets the path to where the file or directory is mounted in the container. For more information on how to set up custom dictionaries, refer to link:https://www.tiny.cloud/docs/tinymce/latest/custom-dictionaries-for-tiny-spellchecker/[Adding custom dictionaries].
74+
* `dynamic-custom-dictionaries`: When set to true, the {pluginname} service periodically checks the dictionary files in `custom-dictionaries-path` for changes and updates the custom dictionaries at runtime without requiring a service restart. The default value is `false`.
6975

70-
To add custom dictionaries, create a folder on your machine and add the dictionary files. The custom dictionaries must conform to specific rules described in link:https://www.tiny.cloud/docs/tinymce/latest/custom-dictionaries-for-tiny-spellchecker/#creating-custom-dictionary-files[Adding custom dictionaries]. In the `application.conf` file, the `spelling` setting can be configured with the following parameters:
76+
[NOTE]
77+
Enabling the `dynamic-custom-dictionaries` option introduces some performance overhead, which may result in a wait time for the custom dictionaries to load.
7178

72-
* `custom-dictionaries-path`: Takes `<HOST_PATH_TO_CUSTOM_DICT_FOLDER>` as its value. Upon running the container, the specified folder is mapped to the target folder inside the container.
73-
* `dynamic-custom-dictionaries`: When set to true, the {pluginname} service periodically checks the dictionary files in `<HOST_PATH_TO_CUSTOM_DICT_FOLDER>` for changes and updates the custom dictionaries at runtime without requiring a service restart. Enabling this option introduces some performance overhead, which should be considered. The default value is `false`.
79+
=== Run the Docker Container
7480

75-
==== Configure Extra Hunspell Dictionaries
81+
The Docker container can also be run with `docker compose`. In this example, the following directory structure is assumed:
7682

77-
The default Hunspell dictionaries can also be replaced or extended. To do this, create a folder on your machine to store the Hunspell dictionary files. In the `application.conf` file, specify the following in the `spelling` setting:
83+
[source,sh]
84+
----
85+
spelling-service/
86+
└── resources/
87+
├── custom-dictionaries
88+
└── hunspell-dictionaries
89+
└── application.conf
90+
└── docker-compose.yaml
7891
79-
* `hunspell-dictionaries-path`: Takes `<HOST_PATH_TO_HUNSPELL_DICT_FOLDER>` as its value. Upon running the container, the specified folder is mapped to the target folder inside the container.
92+
----
8093

81-
This is an example `application.conf` file with the basic configurations:
94+
Here is an example of the `application.conf` file with the basic configurations:
8295

8396
[source, conf]
8497
----
@@ -99,12 +112,11 @@ ephox {
99112
}
100113
----
101114

102-
=== Launch the Docker Container
103-
104-
Once the application configuration file is ready, proceed with the Docker Compose setup to configure and run the service.
105-
106115
. Create the `docker-compose.yaml` file:
107116

117+
+
118+
Here is an example of how to set up the file given the above directory structure and `application.conf` file:
119+
108120
+
109121
[source, yaml]
110122
----
@@ -117,19 +129,23 @@ services:
117129
init: true
118130
volumes:
119131
- type: bind
120-
source: <PATH_TO_APPLICATION_CONF_FILE_IN_HOST_MACHINE>
132+
source: ./application.conf
121133
target: /ephox-spelling/ephox-spelling-docker-env.conf
122134
read_only: true
123135
- type: bind
124-
source: <HOST_PATH_TO_CUSTOM_DICT_FOLDER>
136+
source: ./resources/custom-dictionaries
125137
target: /app/resources/custom-dictionaries
126138
read_only: true
127139
- type: bind
128-
source: <HOST_PATH_TO_HUNSPELL_DICT_FOLDER>
129-
target: /app/resources/hunspell-dictionaries
140+
source: ./resources/hunspell-dictionaries
141+
target: /app/resources/custom-dictionaries
130142
read_only: true
131143
----
132144

145+
+
146+
[NOTE]
147+
Ensure the `target` path in the `volumes` option matches the `custom-dictionaries-path` and `hunspell-dictionaries-path` in the `application.conf` file.
148+
133149
. Run the service (within the same directory where `docker-compose.yaml` was placed):
134150

135151
+
@@ -228,7 +244,10 @@ To do this, configure the link:https://www.tiny.cloud/docs/tinymce/latest/introd
228244
[source, js]
229245
----
230246
tinymce.init({
231-
…,
247+
selector: 'textarea#spellchecker', // change this value according to your HTML
248+
plugins: 'code tinymcespellchecker link',
249+
toolbar: 'spellchecker language spellcheckdialog',
250+
spellchecker_language: 'en_US',
232251
spellchecker_rpc_url: "http://localhost:18080"
233252
});
234253
----

modules/ROOT/partials/docker/spelling-service/spelling-service-overview.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ The On-Premises version of the link:https://www.tiny.cloud/tinymce/features/spel
55

66
The only requirement to run these services On-Premises is a container runtime or orchestration tool e.g. Docker, Kubernetes, Podman.
77

8-
To get started, contact link:https://www.tiny.cloud/contact/[{companyname} Support] to enable the service. A username and password will be provided to access the {companyname} Cloud Docker registry and pull the Docker image.
8+
A valid access token is required to access the {companyname} Cloud Docker registry and pull the Docker image. Contact link:https://www.tiny.cloud/contact/[{companyname} Support] to request the access token.
99

1010
include::partial$misc/admon-dont-push-docker-images.adoc[]

0 commit comments

Comments
 (0)