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

Compare with Current View Page History

« Previous Version 2 Next »

Initializing WProofreader using init() in CKEditor 4

<div id="ckeditor4-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>
	CKEDITOR.disableAutoInline = true;
	CKEDITOR.config.removePlugins = 'scayt,wsc';

	CKEDITOR.on('instanceReady', function(event) {
    	WEBSPELLCHECKER.init({
        	container: event.editor.window.getFrame().$
		});
	});
CKEDITOR.replace('ckeditor4-editor', {});
</script>


  • No labels