Skip to content

Spell Check Support (Tools Menu + Right‑Click Suggestions) #187

Description

@ZFordDev

Problem / Use Case

SnapDock now supports native right‑click context menus, but spellcheck itself is not yet enabled or exposed to the user.
Users expect modern editors to highlight misspelled words and provide correction suggestions, especially when writing documentation, notes, or technical content.

Electron supports spellchecking, but SnapDock does not currently:

  • expose a spellcheck toggle in the Tools Menu
  • show spelling suggestions when right‑clicking an incorrect word
  • provide any UI feedback for misspellings

This limits writing quality and breaks expected editor behavior.


Proposed Solution

Implement spellcheck in two parts:


Part A — Tools Menu Integration

Add a new Tools Menu option:

  • Spellcheck: On / Off

This allows users to enable or disable spellchecking globally.
The setting should persist across sessions (localStorage or workspace metadata).


Part B — Right‑Click Spelling Suggestions

Extend the existing right‑click context menu:

  • Detect misspelled words via params.misspelledWord
  • Show correction suggestions via params.dictionarySuggestions
  • Add menu items for each suggestion
  • Apply the selected correction to the editor

Electron provides this data automatically when spellcheck is enabled.

Example:

Replace “teh” with:
- the
- tech
- ten

This should appear above the standard edit actions (undo, copy, paste, etc.).


Alternatives Considered

  • Custom spellcheck implementation (too heavy, not needed)
  • Third‑party libraries (adds complexity, not required)
  • Browser‑based spellcheck only (incomplete without right‑click suggestions)

Electron’s built‑in spellcheck is the correct approach.


Additional Notes


Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions