Inline spelling and spelling review

    The editor checks document text with bundled local dictionaries. Inline marks use browser CSS Highlights and do not become part of saved HTML.

    The native Avalonia HTML Editor spell checker showing a misspelled word and suggested corrections.
    The native Avalonia HTML Editor spell checker showing a misspelled word and suggested corrections.
    editor.EnableInlineSpellChecking = true;
    await editor.CheckSpellingAsync();
    

    Inline checking is off by default; setting EnableInlineSpellChecking to true marks misspellings as accepted content changes arrive. CheckSpellingAsync opens spelling review from an attached owner window in editable design mode. The review captures the current text, document generation and revision before accepting replacements. A changed document rejects a stale result. Block, cell and line-break boundaries separate words without changing the original character offsets.

    Custom words and ignored words

    DictionaryFile.EnableUserDictionary defaults to true, while UserDictionaryFilePath defaults to empty. There is no automatic persistent destination. Configure an explicit writable local UTF-8 word-per-line file before offering Add; disabling the option hides Add. Persistence failures are reported rather than silently presented as a saved word. Ignored words apply to the current checker instance, including later documents checked by that instance; other editor instances keep their own ignored-word state. Changing dictionary or scan options recreates the checker.

    // Your application chooses a permanent writable local path.
    editor.SpellCheckOptions.DictionaryFile.UserDictionaryFilePath = configuredUserWordsPath;
    

    Bounded scanning and localization

    SpellCheckOptions configures the scan. The native host accepts at most 5,000 issues per scan. Close an active review before changing its dictionary or options. A newer exact document snapshot cancels its older scan. Action, review-status and completion captions use the editor instance's shared language resources.

    The native spelling workflow and final packaged application require actual platform qualification. Local dictionary processing does not itself imply that every other document resource is offline.

    Choose a spelling dictionary

    // Spelling follows the interface language by default.
    // Pin a bundled dictionary only when the document language differs.
    editor.SpellCheckLanguage = "de_DE";
    

    The default spelling language follows the instance interface language. Set SpellCheckOptions.SpellCheckLanguage explicitly to select a different policy. Custom dictionaries require a complete local .dic/.aff pair; an application engine uses the shared ISpellCheckerEngine contract with one live editor owner.

    Related guides

    Last updated on Nov 2, 2026

    Put this into practice.

    Start with the C# Avalonia sample. Restore this edition's package and install the native browser prerequisites before running it.

    Prefer a guided look? Book a free live demo with our engineers - live on Zoom or Teams, never a chatbot.