Initializing WProofreader using init() in TinyMCE 5
<!-- Include the WEBSPELLCHECKER_CONFIG variable. -->
<script>
window.WEBSPELLCHECKER_CONFIG = {
autoSearch: true,
autoDestroy: true,
...
};
</script>
<script type="text/javascript" src="http(s)://host_name/wscservice/wscbundle/wscbundle.js"></script>
<div id="tinymce5-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>
<script>
tinymce.init({
selector:'div',
init_instance_callback : function (tinymce_editor){
WEBSPELLCHECKER.init({
container: tinymce_editor.iframeElement
})
},
});
</script>