Skip to content

feat: sync types with plugin API 0.28.0 (spell-check engines) - #17

Open
hamidfzm wants to merge 1 commit into
mainfrom
feat/spellcheck-engine-api
Open

hamidfzm wants to merge 1 commit into
mainfrom
feat/spellcheck-engine-api

Conversation

@hamidfzm

@hamidfzm hamidfzm commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Syncs types/glyph.d.ts with plugin API 0.28.0: spell-check engines.

  • SpellChecker: one dictionary as an engine loads it (correct, suggest, add, optional dispose).
  • SpellcheckEngine: create(aff, dic) builds a checker from a dictionary's Hunspell text.
  • ctx.spellcheck.registerEngine(engine): check every dictionary with this engine instead of the built-in one; the disposer restores the previous engine.
  • The header lists spellcheck.registerEngine among the main-context-only APIs: the editor checks each word synchronously, so a sandboxed worker cannot answer.

App side: hamidfzm/glyph#1071. The official engine plugin is glyph-md/plugins#25.

npx tsc --noEmit passes.

Adds SpellChecker, SpellcheckEngine and ctx.spellcheck.registerEngine, which replaces the engine every dictionary is checked with; the disposer restores the previous one. The header lists it among the main-context-only APIs, since the editor checks each word synchronously and a sandboxed worker cannot answer in time.
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.

1 participant