ASPxRichEditSettings.SpellChecker Property
Provides access to the spelling settings for checking the RichEdit’s content.
Namespace: DevExpress.Web.ASPxRichEdit
Assembly: DevExpress.Web.ASPxRichEdit.v24.1.dll
NuGet Package: DevExpress.Web.Office
Declaration
Property Value
Type | Description |
---|---|
ASPxRichEditSpellCheckerSettings | A ASPxRichEditSpellCheckerSettings object that holds the spelling options. |
Property Paths
You can access this nested property as listed below:
Library | Object Type | Path to SpellChecker |
---|---|---|
ASP.NET Web Forms Controls | ASPxRichEdit |
|
ASP.NET MVC Extensions | RichEditSettings |
|
Remarks
Example
ASPxRichEdit built-in spell checking support, including the type-as-you-go error detection. End-users can correct a misspelled word in the Spelling dialog. It can be opened using the corresponding context menu’s item when a cursor is over the misspelled word. This dialog allows a user to select spelling suggestions (they are also displayed in the context menu), change or ignore the error once or in all cases, and add a new word to the dictionary. You can also invoke the Spelling dialog using the client-side openSpellingDialog command. In this example, ASPxRichEdit includes a custom ribbon button: clicks on this item are processed using the client-side CustomCommandExecuted event. The event handler identifies the custom item via a command name and executes the openSpellingDialog command.
function onRichEditCustomCommandExecuted(s, e) {
if(e.commandName = "OpenSpellingDialog") {
RichEdit.commands.openSpellingDialog.execute();
}
}
<dx:ASPxRichEdit ID="RichEdit" runat="server" ClientInstanceName="RichEdit">
<ClientSideEvents CustomCommandExecuted="onRichEditCustomCommandExecuted" />
<Settings>
<SpellChecker Enabled="true" SuggestionCount="4">
<Dictionaries>
<dx:ASPxSpellCheckerISpellDictionary
AlphabetPath="EnglishAlphabet.txt"
GrammarPath="english.aff"
DictionaryPath="american.xlg"
Culture="English (United States)"
CacheKey="ISpellDic">
</dx:ASPxSpellCheckerISpellDictionary>
</Dictionaries>
</SpellChecker>
</Settings>
<RibbonTabs>
<dx:RibbonTab Text="Review">
<Groups>
<dx:RibbonGroup Text="Proofing">
<Items>
<dx:RibbonButtonItem
Name="OpenSpellingDialog"
Text="Spelling"
Size="Large"
LargeImage-IconID="format_spellcheck_32x32gray">
</dx:RibbonButtonItem>
</Items>
</dx:RibbonGroup>
</Groups>
</dx:RibbonTab>
</RibbonTabs>
</dx:ASPxRichEdit>
string documentId = "docId";
protected void Page_Load(object sender, EventArgs e) {
if(!IsPostBack) {
RichEditDocumentServer server = new RichEditDocumentServer();
server.LoadDocument(Server.MapPath("~/SpellChecking.docx"));
DocumentManager.CloseDocument(documentId);
RichEdit.Open(documentId, DocumentFormat.OpenXml, () => server.OpenXmlBytes);
}
}