HTML editable elements

This guide outlines the main steps to initialize WProofreader in HTML editable elements such as <input> and <textarea>, and HTML contenteditable elements such as <div>, <iframe> and etc. All the steps described are provided for the Cloud version of WProofreader.

WProofreader add-on for rich text editors enables grammar and spell check, combining spelling and grammar suggestions while you type or work with your text in a floating dialog.

Its auto-searching feature enables detecting new editable fields on the page and proofreading the text they contain automatically on hover selection. No additional actions or plugins are required for enabling WProofreader in a specific WYSIWYG editor or HTML editable element. A single configuration applies to almost all editors and controls. Here is the list of WProofreader supported integrations.

1. Obtain activation key

Sign up for the trial versionarrow-up-right to get started with WProofreader Cloud. Once you have subscribed, you will receive an email with your service ID, an activation key, required for the WProofreader service activation.

If you already have one, you can skip this step.

2. Activate service

Make sure you have specified the options, which are instructing where spelling and grammar checking requests will be processed.

To activate the Cloud version of WProofreader, you are required to add serviceId option to the CONFIG with your activation key and specify the correct path to the wscbundle.js file on our Cloud.

<script>
    window.WEBSPELLCHECKER_CONFIG = {
        ...
        serviceId: 'your-service-ID'
        ...
        };
</script>
<script type="text/javascript" src="https://svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js"></script>

Meanwhile to activate the on-premise version of WProofreader you have to specify the server parameters and appropriate path to wscbundle.js file on your server.

3. Initialize WProofreader

Below you will find examples of initialization in contenteditable elements such <div> and <iframe> and editable elements such as <input> and<textarea>.

Initialize WProofreader in contenteditable <div> element using either imperative or declarative notation as it is shown in the examples below.

WProofreader (Imperative Notation):

WProofreader (Declarative Notation):

4. Adjust default options

You can adjust the default options for your needs. Here is a full list of WProofreader customization optionsarrow-up-right and their possible values.

Check a demo page with the WProofreader initialization in HTML controlsarrow-up-right on our website.


Last updated

Was this helpful?