blazor-devexpress-dot-blazor-dot-richedit-dot-dxrichedit-b6951d6a.md
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
[DefaultValue(false)]
[Parameter]
public bool CheckSpelling { get; set; }
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true to check spelling; otherwise, false.
|
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="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