Use a custom spell-check engine

    Plug an application-owned spelling engine into the same review workflow used by the native editor. Implement the shared ISpellCheckerEngine contract, then select Custom mode.

    An engine instance has one active native editor owner; give independent editors separate engine instances.

    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.

    Use it in your application

    The engine in the example is your implementation of the shared spelling interface. Inspect the package API for its exact methods before implementing it.

    Supply predictable local behavior for checking, suggestions and disposal. The editor calls your engine off the interface thread, one call at a time, so a slow call delays results without freezing the window; keep slow network work out of these synchronous calls all the same. AddToUserDictionary is called only when the user dictionary is enabled and SpellCheckOptions.DictionaryFile.UserDictionaryFilePath names a file.

    Test cancellation, document changes and custom-word policy with the engine you deploy. The editor cannot infer those behaviors from an interface declaration.

    editor.SpellCheckOptions.CustomSpellCheckerEngine = engine;
    editor.SpellCheckOptions.SpellChecker = SpiceLogic.HtmlEditor.Abstractions.Entities.SpellCheck.SpellCheckerEngineTypes.Custom;
    

    Members

    Implement these five members of the shared spelling interface.

    MemberSignature
    AddToUserDictionaryvoid AddToUserDictionary(string word)
    Disposevoid Dispose()
    Initializevoid Initialize(string dictionaryPath, string affixPath, string userDictionaryPath)
    Spellbool Spell(string word)
    SuggestIEnumerable<string> Suggest(string word, Nullable<int> max)

    Continue with

    Last updated on Oct 30, 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.