Back to Devexpress

SpellCheckBuilder.CheckWordSpelling(String) Method

aspnetcore-devexpress-dot-aspnetcore-dot-richedit-dot-spellcheckbuilder-dot-checkwordspelling-x28-system-dot-string-x29.md

latest2.0 KB
Original Source

SpellCheckBuilder.CheckWordSpelling(String) Method

Sets the function that checks the spelling of a word.

Namespace : DevExpress.AspNetCore.RichEdit

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

NuGet Package : DevExpress.AspNetCore.RichEdit

Declaration

csharp
public SpellCheckBuilder CheckWordSpelling(
    string value
)

Parameters

NameTypeDescription
valueString

The name of the JavaScript function or the entire JavaScript function code that implements spell check.

|

Returns

TypeDescription
SpellCheckBuilder

A builder for spell check settings.

|

Remarks

The CheckWordSpelling function gets the word to check and a callback function as parameters. The function is called after the word is checked and gets the following parameters:

  • isCorrect - specifies whether the word is correct;

  • suggestions - lists suggested words.

  • Razor C#

cshtml
<script>
function checkWordSpelling(word, callback) {
    ...
};
function addWordToDictionary(word) {
    ...
};
</script>

@(Html.DevExpress().RichEdit("richEdit")
    .SpellCheck (s => {
        s.Enabled(true);
        s.SuggestionCount(5);
        s.AddWordToDictionary("addWordToDictionary");
        s.CheckWordSpelling("checkWordSpelling");
    })
)

For more information, refer to the following help topic: Spell Check.

See Also

SpellCheckBuilder Class

SpellCheckBuilder Members

DevExpress.AspNetCore.RichEdit Namespace