Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

Initializing WProofreader using init() in Froala Editor

Code Block
languagejs
themeEmacs
<!-- Include the WEBSPELLCHECKER_CONFIG variable. -->
<script>
    window.WEBSPELLCHECKER_CONFIG = {
		autoSearch: true,
		autoDestroy: true,
		...	
    };
</script>

<script type="text/javascript" src="http(s)https://your_host_name/wscservice/wscbundle/wscbundle.js"></script>

<div id="froala-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>
    new FroalaEditor('#froala-editor', {
		iframe: true,
        events: {
            'initialized': function() {
                WEBSPELLCHECKER.init({
                    container: this.$iframe ? this.$iframe[0] : this.el
                });
            }
        }
    });
</script>

...