You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Right now this is expected behavior when WProofreader creates extra spans in CKEditor 4 for its markup, and we can't fix this based on the current product mechanics. On July 2019 we plan to implement a new approach of the WPoofreader work, which should resolve such type of cases. We plan to add our markup on a separate layer separate from CKEditor. However, deadlines can be shifted due to tasks with higher priorities. 

As for now, you can add some extra code on your side to clean spans. For example, you can use a "removeMarkupFromString" command. 

var wscInstance; // You will be able to call WPRoofreader API using this variable

window.WEBSPELLCHECKER_CONFIG = {
    ...
    onLoad: function(instance) {
        wscInstance = instance; // Here you make WProofreader instance available from your code
    }
}

So you can do this:

wscInstance.removeMarkupFromString('<p>Example <span class="wsc-spelling-problem" data-spelling-word="texxt" data-wsc-lang="en_US">texxt</span>.</p>'); // It will return'<p>Example texxt.</p>'

Here you can find more information about available Web API commands and how they work. Please note that such implementation should be done on our side and our team can't provide you the specific instructions on how to do it within your support terms.