Offline Dictionary & Spellchecker Overhaul

Offline Dictionary & Spellchecker Overhaul

Accurate, dependable spellchecking is vital for publication publishing. Previous proofing iterations relied on third-party remote API services that introduced network latency, rate limits, missing everyday words (falsely flagging common terms like "highlight" and "highlighted"), offset drift that caused squiggly underlines to start mid-word or span into adjacent blocks, and unrelated suggestions. Version 5.8.5 delivered a complete architectural overhaul, bundling a dedicated 274,000+ word curated offline English lexicon, direct DOM text-node token scanning, and sub-millisecond local phonetic suggestions.

📖 Instant Offline Spellchecking with Contextual SuggestionsScreenshot 2026 10 16 045039Misspelled words receive instant local proofing underlines with zero network latency and accurate suggestions on right-click.

Comprehensive Curated Offline English Lexicon (274,000+ Words)

Version 5.8.5 eliminated remote network proofing dependencies entirely:

  • High-Speed Curated Lexicon: Bundled tools/proofing/dictionary.js combining SCOWL (standard Chromium/Firefox dictionary) and ENABLE1, containing 274,757 curated words loaded into an instant O(1) Set.

  • Zero False Positives for Everyday Words: Words like highlight, highlighted, highlights, highlighter, and highlighting are fully recognized.

  • US, UK & Commonwealth Orthography: Built-in support for both American and British variations (such as colour, favourite, theatre, realise, centre, dialogue, and travelling).

  • Specialized Prepress & Publishing Vocabulary: Comprehensive vocabulary including bleed, kerning, leading, tracking, cmyk, dpi, ppi, vector, raster, imposition, and dropcap.

Direct Text-Node Token Scanning (Zero Offset Drift)

Underline misalignment and mid-word squiggles were resolved at the DOM architecture level:

  • The Root Cause of Drift: Remote APIs calculated character offsets against innerText (which inserts newline characters for block elements like <div>, <p>, and <br>). In-app traversals counted textContent without newlines, causing DOM ranges to drift progressively across lines.

  • Direct TreeWalker Scanning: Upgraded paintHighlights() in tools/proofing/spellcheck-engine.js to scan DOM text nodes directly using TreeWalker(NodeFilter.SHOW_TEXT) and regex word boundary tokenization (/[A-Za-z]+(?:['’][A-Za-z]+)?/g).

  • Precise Range Construction: Range objects are constructed strictly on (textNode, match.index, match.index + rawWord.length), guaranteeing squiggly underlines never start mid-word, underline partial words, or span across block boundaries.

Instant Phonetic & Damerau-Levenshtein Suggestions

Contextual replacement suggestions are generated locally in sub-millisecond time:

  • Local Phonetic Matching: Right-clicking misspelled words calculates intelligent phonetic and edit-distance matches locally (e.g. highlite → highlight, recieve → receive, seperate → separate).

  • Casing Preservation: Capitalized inputs produce capitalized suggestions (Hightlight → Highlight), and uppercase inputs generate uppercase replacements.

  • Full Options Suite Preservation: Preserved Custom Dictionary management with word deletion, Ignored Words, Ignored Grammar Rules, and Autocorrect shortcuts.

Tip: You can add specialized company names and proprietary technical terms directly to your Custom Dictionary in the Options dialog.

30,000-Word Vocabulary Expansion (Brands & Proper Nouns)

Version 5.9.6 expanded the local English proofing dictionary with more than 30,000 modern brand names, high-street supermarkets, retailers, common acronyms, and geographic regions across the UK and US. This substantial offline vocabulary upgrade prevents red squiggly underlines from cluttering marketing flyers, newsletters, and promotional coupons that frequently cite established commercial brand names.

Single-Letter Word Recognition ('A', 'I', 'O')

Version 5.10.5 optimized word token validation in the proofing engine to recognize valid standalone English single-letter words ("A", "I", and poetic "O"). These entries are pre-seeded in the fast-path dictionary cache, eliminating false-positive red spelling underlines in sentences like "A quick start" or "I am writing", while preserving contextual grammar rules that prompt for uppercase "I" when typed in lowercase.