Skip to content

Add WProofreader spelling and grammar check module for Quill#1

Merged
Artem-Okladov merged 17 commits into
mainfrom
feature/package
Jun 30, 2026
Merged

Add WProofreader spelling and grammar check module for Quill#1
Artem-Okladov merged 17 commits into
mainfrom
feature/package

Conversation

@Artem-Okladov

@Artem-Okladov Artem-Okladov commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Adds the initial implementation of WProofreader as a native Quill module. Spelling and grammar checking is enabled declaratively through Quill's configuration, with a toolbar dropdown button that follows the editor's state.

What's included

  • Module (src/index.js entry + src/wproofreader.js), registered as modules/wproofreader. It initializes WProofreader via the @webspellchecker/wproofreader-sdk-js SDK and exposes enable, disable, toggle, openSettings, openDialog, isDisabled, and destroy.
  • Toolbar dropdown (src/wproofreader-dropdown.js): when the editor has a toolbar, a WProofreader button is injected; clicking it opens a dropdown with Disable, Settings, and Proofread in dialog when enabled, and Enable when disabled. The actions are performed by the WProofreader engine.
  • Read-only support: proofreading and the toolbar button follow the editor's editable state, at init and when toggled at runtime via quill.enable().
  • Styles (src/styles.css), exported as @webspellchecker/wproofreader-quill/styles.css, and the button icon (src/icon.svg).
  • TypeScript declarations (src/index.d.ts).
  • Test suite (Vitest + jsdom): 27 tests in tests/
  • CI (.github/workflows/ci.yml): runs test suite on pull requests and pushes to main.

How it works

  • Enable it via modules.wproofreader; options are forwarded to the SDK's init(). srcUrl selects the bundle (cloud default, or an on-premise URL).
  • Scoped to the editor through init({ container: quill.root }). It does not enable the page-wide autoSearch option.
  • The module always sets appType: "wpr_quill" to identify the integration; this value is fixed and ignores any appType passed in the config.
  • The module and the dropdown are decoupled: they coordinate through events on quill.root (src/events.js), with no direct references in either direction. WProofreader's destroy() tears down the dropdown via an event.
  • quill and @webspellchecker/wproofreader-sdk-js are peer dependencies; the SDK loads the engine at runtime.

Build and packaging

  • Vite library build to dist/index.js (ESM) and dist/index.umd.cjs (UMD); quill and the SDK are external.
  • Licensed under MIT.

Test plan

  • npm test (27 passing)
  • npm run build (ESM + UMD)
  • Verified against Quill configuration variations (bubble theme, read-only, placeholder, formats whitelist) in a standalone demo and both supported major Quill branches (1.x & 2.x)

Video demo

Screen.Recording.2026-06-23.at.07.55.48.mov

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@Bohdan-Chui Bohdan-Chui left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good. Please, add video example of usage

Comment thread src/script-loader.js Outdated
Comment thread src/index.js Outdated
Comment thread src/index.js Outdated
Comment thread src/script-loader.js Outdated
Comment thread src/wproofreader.js Outdated
Comment thread src/wproofreader.js Outdated
Comment thread src/wproofreader.js Outdated
Comment thread src/wproofreader.js Outdated
Comment thread src/index.js Outdated
Comment thread src/wproofreader.js Outdated
Comment thread src/wproofreader.js
Comment thread src/wproofreader.js Outdated
@Bohdan-Chui

Copy link
Copy Markdown
Contributor

Is this plugin compatible with quill 1..?

Comment thread src/wproofreader.js Outdated
Comment thread src/wproofreader.js Outdated
Comment thread src/wproofreader.js Outdated
Comment thread src/wproofreader.js Outdated
Comment thread src/wproofreader.js Outdated
Comment thread src/wproofreader.js Outdated
Comment thread package.json
Comment thread package.json Outdated
Comment thread package.json
Comment thread src/wproofreader-dropdown.js Outdated
Comment thread src/wproofreader-dropdown.js Outdated
Comment thread src/wproofreader.js Outdated
Artem-Okladov and others added 6 commits June 23, 2026 06:35
Co-authored-by: Bohdan <83748023+Bohdan-Chui@users.noreply.github.com>
Co-authored-by: Bohdan <83748023+Bohdan-Chui@users.noreply.github.com>
Co-authored-by: Bohdan <83748023+Bohdan-Chui@users.noreply.github.com>
@Artem-Okladov Artem-Okladov merged commit 2343a1a into main Jun 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants