The DevExpress ASP.NET MVC Rich Text Editor (RichEdit) supports the AutoCorrect feature that allows you to analyze the typed text and modify or substitute it. The control provides the AutoCorrect capabilities that can be enabled by setting the corresponding server-side properties to true. You also can perform custom substitution algorithms by handling the client-side AutoCorrect event.
You can enable the built-in AutoCorrect feature using the following server-side properties:
- CorrectTwoInitialCapitals - specifies whether the control should correct words that start with two capital letters by changing the second letter to lowercase.
- DetectUrls - specifies whether the control should detect URI strings and format them as hyperlinks.
- EnableAutomaticNumbering - specifies whether the control should automatically start numbered or bulleted lists when the specific symbols are typed.
- ReplaceTextAsYouType - specifies whether the control should search a replacement for the typed string in the AutoCorrectReplaceInfoCollection collection.
If you need to extend the control's AutoCorrect functionality, you can handle client-side AutoCorrect event that occurs when a user types text in the control. While handling the event, you can use the client commands to insert formatted text, images, tables, and other document objects.
In this demo, you can try the AutoCorrect functionality by typing symbols to in the rightmost column of the table in the document.
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
The source code files for this demo are installed (by default) in the following directory:
Open CS Solution
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxRichEditDemos