Initialize using npm SDK
The WProofreader SDK npm package is designed for JavaScript framework projects (React, Angular, Vue) or setups where you use multiple editors and want a single proofreading dependency. It works with any supported editor and HTML editable element.
See framework examples with CKEditor 4, TinyMCE, Froala, and Quill →
Install the package
npm install @webspellchecker/wproofreader-sdk-jsImport and configure
Import the SDK in the file that initializes your application. Call configure() once to set global options. This must happen before any init() calls.
Cloud:
import WProofreaderSDK from '@webspellchecker/wproofreader-sdk-js';
WProofreaderSDK.configure({
autoSearch: true,
lang: 'en_US',
serviceId: 'your-service-ID'
});Self-hosted:
import WProofreaderSDK from '@webspellchecker/wproofreader-sdk-js';
WProofreaderSDK.configure({
autoSearch: true,
lang: 'en_US',
serviceProtocol: 'https',
serviceHost: 'your_host_name',
servicePort: '443',
servicePath: 'wscservice/api',
srcUrl: 'https://your_host_name/wscservice/wscbundle/wscbundle.js'
});With autoSearch enabled, WProofreader will activate automatically when any editable element receives focus. You don't need to do anything else.
Force initialization on a specific element
If you don't want to wait for autoSearch and need proofreading to start immediately, call init() on a specific container:
TypeScript support
Starting from version 1.1.0, the package includes type definitions (.d.ts) for core methods, initialization, configuration, and instance management. Refer to the Angular example → for a TypeScript integration sample.
Related resources
GitHub repository → with framework examples for React, Angular, and Vue
Configuration reference → for the full list of available options
Was this helpful?

