Back to Devexpress

DxRichEdit.CheckSpelling Property

blazor-devexpress-dot-blazor-dot-richedit-dot-dxrichedit-b6951d6a.md

latest2.1 KB
Original Source

DxRichEdit.CheckSpelling Property

Specifies whether to check spelling in the Rich Text Editor.

Namespace : DevExpress.Blazor.RichEdit

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

NuGet Package : DevExpress.Blazor.RichEdit

Declaration

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

Property Value

TypeDefaultDescription
Booleanfalse

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:

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

@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
        );
    }
}

See Also

DxRichEdit Class

DxRichEdit Members

DevExpress.Blazor.RichEdit Namespace