The ASP.NET MVC Rich Text Editor (RichEdit) provides a comprehensive API, allowing you to manipulate the open document programmatically on the client side. The available client manipulation API is exposed through the following properties.
Available commands are a powerful tool for manipulating document content on the client using code. Most commands replicate the RichEdit's default UI commands available through the editor's ribbon. These commands are useful when you are required to implement a custom toolbar for the RichEdit instead of the default built-in ribbon. For an example of such a custom toolbar, refer to the Custom Toolbar via Client API demo.
Each command exposes the execute and getState methods. For its execution, a command may require additional data to be passed as the execute method's parameter. The execute method may result in no action taken if a command's state obtained using the getState method does not allow command execution (for instance, in case when a command is not enabled in the ribbon).
This demo is an illustration of how the client API for commands and selection can be used in the RichEdit.