This document provides the instructions on how to install and configure all the supported spell checkers integrations and how to enable the default Swing spell checker service.
Configuration parametres
Below the list of the configurable parameters, for each it is specified which spellcher it works with.
List of configurable parameters
| Parameter | Mandatory | Description | Spellcheckers |
|---|---|---|---|
name |
Required |
Defines the spell checker provider name. It is specified below for each provider in its configuration area |
All |
defaultLanguage |
Optional |
The default language name used when the 'xml:lang' attribute in the story is not specified. The en-us is set when nothing is specified |
All |
excludeTags |
Optional |
A list of tags that must be excluded |
All |
inlineBlockTags |
Optional |
A list of tags that are not declared as blockItems, but that should be treated as separated text blocks from the surrounding text nodes |
All |
username |
Optional |
The username of the related spellchecker user. Defaults to Swing username if not specified. Note: Should be the user’s Active Directory username if the Tansa Active Directory integration is installed on the server side |
TansaWeb, Cordial, Duden |
profileId |
Optional |
The numerical identifier of the profile/dictionary to use for text analysis. If omitted or no corresponding profile is found, defaults to the first profile found that is compatible with the language of the text. Text language is obtained from 'xml:lang' attributes in a story, if this attributes is not present language defaults to en-us |
TansaWeb |
licenseKey |
Optional |
This property is optional for Tansa Web Classic (non-SaaS), so the field can be left empty in those cases but Tansa will be making licenseKey a requirement for all customers in the future |
TansaWeb |
Below the list of the configurable <inline> spellchecker parameters, for each it is specified which spellcher it works with.
| Parameter | Mandatory | Default | Description | Spellcheckers |
|---|---|---|---|---|
enable |
Optional |
true |
If false, it disabled the inline spellcheck function editing the document, the user can enable the function manually form the View tab. Once enabled, it will trigger a load of the object props, set the flag, and keep the flag in memory to avoid requesting object props at next inline spell request |
Edisomedia, Proximity, Talo, TansaWeb, Duden |
spellCheckDebounce |
Optional |
500 |
It represents the delay in milliseconds to wait since user stop writing and remote invocation to spellchecker service |
Edisomedia, Proximity, Talo, TansaWeb, Duden |
repositionDebounce |
Optional |
10 |
It represents the delay in milliseconds to wait since user stop writing and current spell highlights position is updated |
Edisomedia, Proximity, Talo, TansaWeb, Duden |
Configuration example
Below a configuration parameters example:
<WebClientConfiguration>
<!-- ... other configurations ... -->
<editor>
<story>
<spellChecker>
<name>eidosmedia</name>
<defaultLanguage>en-us</defaultLanguage>
<!-- <username>username</username>
<profileId>507</profileId> -->
<excludeTags>
<tag>pbox</tag>
<tag>extra</tag>
<tag>story-links</tag>
</excludeTags>
<inlineBlockTags>
<tag>td</tag>
<tag>inline2</tag>
</inlineBlockTags>
<!-- <inline>
<enable>false</enable>
<spellCheckDebounce>700</spellCheckDebounce>
<repositionDebounce>50</repositionDebounce>
</inline>
-->
</spellChecker>
</story>
</editor>
</WebClientConfiguration>
Supported Spell Checkers
This section provides the instructions on how to configure all the supported spell checker integrations.
ProLexis
Swing allows the integration of ProLexis Web Service 2.0b10 or 3.0.1 and above.
This integration is provided by libraries from Diagonal ProLexis Web Service, please refer to ProLexis documentation for further details.
Enabling
To enable it set the prolexis value in the <name> parameter and follow the instructions below.
A dedicated right panel named "ProLexis" will be displayed within the Editor.
Installation
-
Unzip the file you get from ProLexis, you can unzip it anywhere you like, it won’t be needed once you have finished the installation
-
Copy the folder DiagPlWs to {SWING} root folder. Prolexis can also be configured outside {SWING}, see the paragraph How to configure ProLexis in external folder
-
Copy the file DiagPlWs/DiagPlWs.js to {SWING}/app/plugins/libs
Set up ProLexis Web Service Proxy
Swing uses proxies to communicate to external services. This is necessary due to the Same-Origin Policy used by modern browsers.
The same-origin policy restricts how a document or script loaded from one origin can interact with a resource from another origin. Same-origin Policy is used as a means to prevent some of the Cross-site Request Forgery attacks.
Copy the proxy configuration in main swing.xml configuration file.
<!-- other configuration -->
<proxies>
<proxy>
<name>DiagPlWs/proxy</name>
<targetUri>http://diagonal-ws.prolexis.com/prolexisws/ProLexisService</targetUri>
</proxy>
</proxies>
How to configure ProLexis in external folder
ProLexis may be made available to Swing application by defining a nested components in Swing web context in server.xml (for further details on Tomcat 9.x Resources configuration, please refer to Resources configuration).
Example of the external ProLexis configuration:
<Context docBase="com.eidosmedia.webclient.web-app"
path="/swing" reloadable="false">
<Resources
className="org.apache.catalina.webresources.StandardRoot">
<PreResources
className="org.apache.catalina.webresources.DirResourceSet"
base="/methode/meth01/methode-servlets/conf/swing/com.eidosmedia.swing.web-app/DiagPlWs" readOnly="true"
webAppMount="/DiagPlWs" />
</Resources>
</Context>
Tansa Web
Swing allows the integration of Tansa REST API version 5.0.0.95 and above and Tansa Web Client 5.0.19.1243 and above.
This integration is provided by Tansa solutions, please refer to Tansa documentation for further details.
Enabling
For Tansa there are two different integrations: basic and advanced. To enable them set one of the following <name>:
-
tansaweb for use the simple integration of the Tansa proofing service through the standard Swing spell checker panel
-
tansaweb-advanced for use the advanced integration and have the full Tansa Web Client with all the features offered by Tansa in their proprietary interface
Both in the case of the basic integration ('tansaweb') and advanced integration ('tansaweb-advanced') a dedicated right panel named "Tansa" will be displayed within the Editor.
Set up Tansa Proxy
Swing uses proxies to communicate to external services. This is necessary due to the Same-Origin Policy used by modern browsers.
The same-origin policy restricts how a document or script loaded from one origin can interact with a resource from another origin. Same-origin Policy is used as a means to prevent some of the Cross-site Request Forgery attacks.
Copy the proxy configuration in swing.xml configuration file, replacing '<targetUri>' value with the url given by the service provider.
<!-- other configuration -->
<proxies>
<proxy>
<name>TansaWeb/proxy</name>
<targetUri>http://d02.tansademo.net:8080</targetUri>
</proxy>
</proxies>
Cordial
Swing allows the integration of Cordial as Saas v20.
This integration is provided from Cordial, please refer to Cordial as Saas documentation for further details.
Enabling
To enable it set the cordial value in the <name> parameter and follow the instructions below.
A dedicated right panel named "Cordial" will be displayed within the Editor.
Set up Cordial Proxy
Swing uses proxies to communicate to external services. This is necessary due to the Same-Origin Policy used by modern browsers.
The same-origin policy restricts how a document or script loaded from one origin can interact with a resource from another origin. Same-origin Policy is used as a means to prevent some of the Cross-site Request Forgery attacks.
Copy the proxy configuration in swing.xml configuration file, replacing '<targetUri>' value with the url given by the service provider.
<!-- ... other configurations -->
<proxies>
<proxy>
<name>cordial</name>
<targetUri>http://url/to/textcheckersaas/correctionCordialSaas</targetUri>
</proxy>
</proxies>
Duden
Swing allows the integration of Duden Korrekturserver version 1.0 and above.
This integration is provided from Duden, please refer to Duden Korrekturserver documentation for further details.
Enabling
To enable it set the duden value in the <name> parameter and follow the instructions below.
A dedicated right panel named "Duden" will be displayed within the Editor.
Set up Duden Proxy
Swing uses proxies to communicate to external services. This is necessary due to the Same-Origin Policy used by modern browsers.
The same-origin policy restricts how a document or script loaded from one origin can interact with a resource from another origin. Same-origin Policy is used as a means to prevent some of the Cross-site Request Forgery attacks.
Copy the proxy configuration in swing.xml configuration file, replacing '<targetUri>' value with the url given by the service provider.
<!-- ... other configurations -->
<proxies>
<proxy>
<name>duden</name>
<targetUri>http://url/to/duden/korrekturserver</targetUri>
</proxy>
</proxies>
Talo
Swing allows the integration of TALO spelling checker.
This integration is provided from TALO.
Enabling
To enable it set the talo value in the <name> parameter.
A dedicated right panel named "Talo" will be displayed within the Editor.
Is required to install and configure a plugin in the Methode Application Rest Server backend to make Talo working.
Refer to EDAPI for the backend configuration.
Proximity
Swing allows the integration of Proximity spelling checker.
This integration is provided from Proximity Technology.
Enabling
To enable this set the proximity value in the <name> parameter.
A dedicated right panel named "Proximity" will be displayed within the Editor.
Refer to EDAPI for the backend configuration.
Default Swing spell checker
Swing provides a default spell checker.
All other info and documentations about this integration is available to the site https://languagetool.org/.
Enabling
To enable this set the eidosmedia value in the <name> parameter and follow the instructions below.
A dedicated right panel named "Spell Check" will be displayed within the Editor.
Enable spell checker service
By default, the spell checker service web application is present in the Swing package, but its web context is commented in server.xml. Remove the surrounding comment from the spell checker declaration to make it available.
<!-- SpellChecker configuration -->
<Context docBase="${catalina.home}/swing/com.eidosmedia.swing.spellchecker"
path="/swing/spellchecker" reloadable="false">
</Context>
List of supported languages
| Name | Code | Language Code |
|---|---|---|
Asturian |
ast |
ast-ES |
Belarusian |
be |
be-BY |
Breton |
br |
br-FR |
Catalan |
ca |
ca-ES |
Chinese |
zh |
zh-CN |
Danish |
da |
da-DK |
Dutch |
nl |
nl |
English |
en |
en |
English (Australian) |
en |
en-AU |
English (Canadian) |
en |
en-CA |
English (GB) |
en |
en-GB |
English (New Zealand) |
en |
en-NZ |
English (South African) |
en |
en-ZA |
English (US) |
en |
en-US |
Esperanto |
eo |
eo |
French |
fr |
fr |
Galician |
gl |
gl-ES |
German |
de |
de |
German (Austria) |
de |
de-AT |
German (Germany) |
de |
de-DE |
German (Swiss) |
de |
de-CH |
Greek |
el |
el-GR |
Italian |
it |
it |
Japanese |
ja |
ja-JP |
Khmer |
km |
km-KH |
Persian |
fa |
fa |
Polish |
pl |
pl-PL |
Portuguese |
pt |
pt |
Portuguese (Brazil) |
pt |
pt-BR |
Portuguese (Portugal) |
pt |
pt-PT |
Romanian |
ro |
ro-RO |
Russian |
ru |
ru-RU |
Slovak |
sk |
sk-SK |
Slovenian |
sl |
sl-SI |
Spanish |
es |
es |
Swedish |
sv |
sv |
Ukrainian |
uk |
uk-UA |