Skip to main content

DxRichEdit.CheckSpelling Property

Specifies whether to check spelling in the Rich Text Editor.

Namespace: DevExpress.Blazor.RichEdit

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

NuGet Package: DevExpress.Blazor.RichEdit

Declaration

[DefaultValue(false)]
[Parameter]
public bool CheckSpelling { get; set; }

Property Value

Type Default Description
Boolean false

true to check spelling; otherwise, false.

Remarks

The Rich Text Editor allows you to use a built-in or custom service to check spelling. Add a spell check service and set the CheckSpelling property to true to enable the spell check feature. The following code snippet adds a Check Spelling check button that allows users to enable/disable this feature at runtime:

<DxRichEdit @ref="@richEdit" CheckSpelling="check" DocumentCulture="en-US" CustomizeRibbon=OnCustomizeRibbon/>

@code {
    DxRichEdit richEdit;
    bool check = true;

    void OnCustomizeRibbon(IRibbon ribbon) {
        IRibbonTab viewTab = ribbon.Tabs[RichEditRibbonTabNames.View];
        IBarGroup spellCheckGroup = viewTab.Groups.AddCustomGroup(0);
        IBarCheckableButton spellCheckButton = spellCheckGroup.Items.AddCustomCheckButton(0, "Check Spelling",
            async () =>  {
                check = !check;
                StateHasChanged();
            },
            () => check
        );
    }
}

Enable/disable spell check

See Also