SpellCheckState
State holder that coordinates spell checking over a TextEditorState.
Tracks misspelled words and sentence-level Corrections, manages the spell-check decoration spans rendered in the document, and runs full or partial checks through an EditorSpellChecker. Span mutations are performed atomically after any asynchronous lookup completes so that a cancelled check never leaves the document with its decorations wiped.
Parameters
Whether spell checking is active initially; exposed via spellCheckingEnabled.
Constructors
Properties
The EditorSpellChecker used to evaluate words and sentences; checks are no-ops while this is null.
Whether spell checking is currently active. Toggle via setSpellCheckingEnabled.
Whether checking operates per-word or per-sentence; see SpellCheckMode.
The underlying editor state whose content is spell checked.
Functions
Apply a sentence-level correction.
Run spell check on a specific word segment. This will remove any existing spell check spans for the word and add a new one if misspelled.
Replace a misspelled word with the chosen correction.
Gather correction suggestions for a word.
Handle click for sentence-level corrections only. Use this when you specifically need a Correction.
Handle click on a spell check span.
Handle click for word-level misspellings only. Use this when you specifically need a WordSegment.
Remove spell-check decorations affected by an edit operation.
Run full spell check based on the current mode.
Run partial spell check based on the current mode.
Enable or disable spell checking.
Enable markdown import and export on a spell-checked editor.