Date: Thu, 28 Mar 2024 16:56:14 +0200 (EET) Message-ID: <89435075.610.1711637774595@ip-172-30-3-56.ec2.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_609_70933223.1711637774592" ------=_Part_609_70933223.1711637774592 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
=
WProofreader add-on for rich text editors enables grammar and =
spell check, combining spelling and grammar suggestions while you type or w=
ork with your text in a floating dialog.
Its auto-searching feature enab= les detecting new editable fields on the page and proofreading the text the= y contain automatically on hover selection. No additional actions or plugin= s are required for enabling WProofreader in a specific WYSIWYG editor or HT= ML editable element. A single configuration applies to almost all= editors and controls. Here is the list of WProofreader supported integrations.
This gui= de outlines the main steps to integrate and configure WProofreader with&nbs= p;auto-searching functionality (autoSearch option). <= /span>All the steps described are provid= ed for the Server version of WProofreader that is hosted a= nd deployed on your server.
There are two approaches for initiali= zing WProofreader with the autoSearch feature in your= web app: using the config variable = or inline data attributes= strong>. Their descriptions follow.
1. Add config with options
Define the required options in WEBSPE=
LLCHECKER_CONFIG. It can be added to any location on a web page before=
or after the wscbundle.js script. However, if you add wscbundle.js&nb=
sp;asynchronously, this CONFIG must be added
In case of the direct connection to W= ebSpellChecker AppServer (AppServer is an entry point), you need to configu= re the SSL connection. Follow the steps described on the E= nabling SSL connection with AppServer page (if you missed that step during the installation).
<script> =09window.WEBSPELLCHECKER_CONFIG =3D { =09=09autoSearch: true, =09=09lang: 'en_US', // set the default language serviceProtocol: 'https', serviceHost: 'your_host_name', servicePort: '443',=20 servicePath: 'virtual_directory/api' // by default the virtual_dire= ctory is wscservice }; </script>
If you are using the older version of= the deployment where SSRV.CGI component is an entry point= , please refer to the sample below.
<script> =09window.WEBSPELLCHECKER_CONFIG =3D { =09=09autoSearch: true, =09=09lang: 'auto', // set the default language serviceProtocol: 'https', serviceHost: 'your_host_name', servicePort: '443', servicePath: 'virtual_directory/script/ssrv.cgi' }; </script>
You also= have an option to load your CONFIG option on your web page from = the file. Just create a *.js file (e.g. wscbundle_config.js) with CONF= IG. This is an example of th= e wscbundle_config.js file.
window.WE= BSPELLCHECKER_CONFIG =3D { =09autoSearch: true, =09... };
Here is = an example of the script that you need to add on your web page with the pat= h to wscbundle_config.js.
<script type=3D"= text/javascript" src=3D"[path_to_config]/wscbundle_config.js"></scrip= t>
2. Add WProofreader script<= /span>
Add the&= nbsp;wscbundle.js script on your web page.
<script type=3D"= text/javascript" src=3D"http(s)://your_host_name/wscservice/wscbundle/wscbu= ndle.js"></script>
In general, initialization of WProofreader using inline attributes is a = good option if you want to have a single script with the base options. = ;To define an additional option as an= inline data attribute, use 'date-wsc-option_name', e.g. 'data-wsc-lang'. You can find the full list of options <= /span>&= nbsp;h= ere.
<script =09data-wsc-autosearch=3D"true" =09data-wsc-lang=3D"auto" =09data-wsc-enableGrammar=3D"true" =09data-wsc-serviceProtocol=3D"https" =09data-wsc-serviceHost=3D"your_host_name" =09data-wsc-servicePort=3D"443" =09data-wsc-servicePath=3D"virtual_directory/api" =09src=3D"https://your_host_name/virtual_directory/wscbundle/wscbundle.js"&= gt; </sctipt>
Consider the following limitation when using inline data attributes for = the WProofreader options: as for now, only options which have = boolean or string types can be used as data attri= butes. The options with array or number t= ype are not supported (= e.g. actionItems, suggestionsCount, moreSuggestionsCount).
You can customize the default op= tions using WProofreader API.
You can check the demos of WProofreader integrations with various rich-text editors on our website.