WProofreader is a spelling and grammar checking tool that integrates with textareas and numerous WYSIWYG editors.
While it usually activates automatically, depending on your application, it may fail to boot.
In my case, an application was using CKEditor 4 and programmatically activated CKEditor. WProofreader's autoSearch
logic failed to hook into that for some reason.
You can choose not to use its autoSearch
feature, but explicitly enable WProofreader.
Here is a guide for CKEditor 4. It should apply to other WYSIWYG editors as well.
-
If you are coming from SCAYT or WSC, remove those plugins from your CKEditor config as described in the migration guide Show archive.org snapshot
config.removePlugins = 'scayt,wsc';
-
Place your
serviceId
and other settings in the global configuration object:window.WEBSPELLCHECKER_CONFIG = { autoSearch: false, // we do that ourselves, so we disable it autoDestroy: true, lang: 'de_DE', serviceId: '...', // ... }
-
Ensure
https://svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js
is loaded as described in the docs. -
To activate WProofreader, you can now call
WEBSPELLCHECKER.init
on CKEditor's iframe (not the textarea). Note that you should be usingCKEDITOR.replace
to activate CKEditor.let editor = CKEDITOR.replace(element) editor.on('instanceReady', () => { WEBSPELLCHECKER.init({ container: editor.window.getFrame().$ }) })
WProofreader will detect CKeditor from that iframe and work its magic.