Back to Devexpress

DictionaryBase Class

blazor-devexpress-dot-blazor-dot-richedit-dot-spellcheck-7c7b2e29.md

latest2.3 KB
Original Source

DictionaryBase Class

Implements the base API for dictionaries.

Namespace : DevExpress.Blazor.RichEdit.SpellCheck

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

NuGet Package : DevExpress.Blazor.RichEdit

Declaration

csharp
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:

csharp
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 additional information: Spell Check.

Inheritance

Object DictionaryBase Dictionary

GrammarBasedDictionary

HunspellDictionary

ISpellDictionary

See Also

DictionaryBase Members

DevExpress.Blazor.RichEdit.SpellCheck Namespace