1. Clone CKEditor Classic editor:
git clone -b stable [email protected]:ckeditor/ckeditor5-build-classic.git |
2. Go to the editor folder:
cd ckeditor5-build-classic |
3. Install all the required dependencies:
cd ckeditor5-build-classic |
4. Install the WProofreader plugin:
npm install @webspellchecker/wproofreader-ckeditor5 --save-dev |
5. Open ckeditor5-build-classic/src/ckeditor.js file.
6. Import the WProofreader plugin:
import WProofreader from '@webspellchecker/wproofreader-ckeditor5/src/wproofreader'; |
7. Extend ClassicEditor.builtinPlugins with the WProofreader plugin:
ClassicEditor.builtinPlugins = [ ..., WProofreader ]; |
8. Add the wproofreader field to ClassicEditor.defaultConfig:
ClassicEditor.defaultConfig = { ..., wproofreader: { serviceId: 'your-service-ID', srcUrl: 'https://svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js' } } |
The full list of configuration options for WProofreader is available in API docs. |
9. Rebuild the bundle:
npm run build |
That's it. Now you should be able to use the spelling and grammar checking functionality of WProofreader with CKEditor 5. Try it out on the default sample page: ckeditor5-build-classic/sample/index.html.