The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientRichEdit.AutoCorrect Event

Fires when text is typed in the control.


AutoCorrect: ASPxClientEvent<ASPxClientRichEditAutoCorrectEventHandler>

Event Data

The AutoCorrect event handler receives an argument of the ASPxClientRichEditAutoCorrectEventArgs type. The following properties provide information specific to this event.

Property Description
handled Specifies whether the event is handled.
interval Gets the input string's interval.
text Gets the input string to check whether it should be replaced.


The AutoCorrect allows you to replace the typed text with any content using the Client API as demonstrated in the following code snipptet:

<script type="text/javascript">
    function OnAutoCorrect(s, e) {
        switch (e.text) {
            case "dxlogo":
                DemoRichEdit.selection.intervals = [e.interval];
                e.handled = true;
            case "bldtxt":
                DemoRichEdit.selection.intervals = [e.interval];
                DemoRichEdit.commands.insertText.execute("Bold Text");
                e.handled = true;

<dx:ASPxRichEdit ID="DemoRichEdit" ClientInstanceName="DemoRichEdit" runat="server">
    <ClientSideEvents AutoCorrect="OnAutoCorrect" />

Note that the text event's argument receives text starting after the last non-letter character (a space, punctuation mark, etc.).

See Also