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

Compare with Current View Page History

Version 1 Next »

Initializing WProofreader using init() in CKEditor 5

<div id="ckeditor5-editor">
    <p>These are an examples of a sentences with two mispelled words and grammar problems. Just type text with misspelling to see how it works.</p>
</div>
<!-- Include the WEBSPELLCHECKER_CONFIG variable. -->
<script>
    window.WEBSPELLCHECKER_CONFIG = {
autoSearch: true,
autoDestroy: true,
...	
    };
</script>
<script type="text/javascript" src="http(s)://your_host_name/wscservice/wscbundle/wscbundle.js"></script>

<script>
ClassicEditor
    .create(document.querySelector('#ckeditor5-editor'))
    .then(editor => {
        WEBSPELLCHECKER.init({
            container: editor.ui._editableElements.get('main')
        });
    });
</script>


  • No labels