Date: Fri, 29 Mar 2024 02:04:41 +0200 (EET) Message-ID: <191826804.640.1711670681688@ip-172-30-3-56.ec2.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_639_282034506.1711670681679" ------=_Part_639_282034506.1711670681679 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
As of release 5.4.0.x prec= eding products based on the SpellCheckAsYouType (SCAYT) core as well as WPr= oofreader use the special markup mechanism for underling spelling and gramm= ar errors. This markup mechanism adds <span> elements with special cl= asses, e.g. class=3D"wsc-spelling-problem", which without preliminary cleaning might got t= o database and then prepopulated to the text.
We understand that this might be a= huge problem to our customers and their end users. Thus, we are developing= a new mechanism of highlighting spelling and grammar problems which will r= esolve the issue with extra <spans>.
Until then, if you have such a problem, we recommend you to implement a = mechanism that on your end that will clean extra <spans> before savin= g the information to a database. Below you can find an example that uses th= e remo= veMarkupFromString command.
<script> var wscInstance; // You will be able to call WProofreader AP= I using this variable window.WEBSPELLCHECKER_CONFIG =3D { ... onLoad: function(instance) { wscInstance =3D instance; // Here you= make WProofreader instance available from your code } } </script>
After that you can use it as foll= ows to clean unnecessary spans that have been added by WProofreader:=
wscInstance.removeM= arkupFromString('<p>Example <span class=3D"wsc-spelling-= problem" data-spelling-word=3D"texxt" data-wsc-lang=3D"en_US">= texxt</span>.</p>'); // It will return'<p>Examp= le texxt.</p>'
For more options and methods in WProofreader, please visit the API options and methods documentation.