Skip to main content

DictionaryBase Class

Implements the base API for dictionaries.

Namespace: DevExpress.Blazor.RichEdit.SpellCheck

Assembly: DevExpress.Blazor.RichEdit.v24.2.dll

NuGet Package: DevExpress.Blazor.RichEdit

Declaration

public abstract class DictionaryBase

Remarks

The built-in spell check service uses dictionaries to check spelling. Use the Dictionaries property to get a list that contains all the added dictionaries. To extend the dictionary list, pass a simple, ISpell, or Hunspell dictionary to the list’s Add method.

The following code snippet adds an ISpell dictionary:

public void ConfigureServices(IServiceCollection services) {
    services.AddDevExpressBlazor().AddSpellCheck(opts => {
        opts.FileProvider = new PhysicalFileProvider(
            Path.Combine(Directory.GetCurrentDirectory(), "Data", "Dictionaries")
        );
        opts.Dictionaries.Add(new ISpellDictionary {
            DictionaryPath = "american.xlg",
            GrammarPath = "english.aff",
            Culture = "en-US"
        });
    });
}

Refer to the following topic for more information: Spell Check.

See Also