Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Client-Side Commands

  • Cut (Ctrl+X)
  • Copy (Ctrl+C)
  • Paste (Ctrl+V)
  • Undo (Ctrl+Z)
  • Redo (Ctrl+Y)
  • Remove Format
  • Superscript
  • Subscript
  • Indent
  • Outdent
  • Insert Link (Ctrl+K)
  • Remove Link (Ctrl+Shift+K)
  • Insert Image (Ctrl+G)
  • Insert Table
    v
  • v
  • v
  • Bold (Ctrl+B)
  • Italic (Ctrl+I)
  • Underline
  • Strikethrough
  • Align Left (Ctrl+L)
  • Align Center (Ctrl+E)
  • Align Right (Ctrl+R)
  • Justify (Ctrl+J)
  • Back Color
    v
  • Fore Color
    v
  • Paste Template
  • Delete All

This demo illustrates how to execute custom commands within the ASPxHtmlEditor on the client.

A custom command is a sequence of calls to standard editor commands. Custom commands can be executed by handling the editor's client CustomCommand event. This event fires if a command name associated with the clicked toolbar item doesn't coincide with any standard predefined editor command.

In this demo, two custom commands are implemented: one deletes the editor's content, and another inserts an e-mail template text. To initiate these commands, a custom toolbar with two items is created. Custom item command names are 'deleteall' and 'pasteemailtemplate', respectively. It is also demonstrated how to assign custom keyboard shortcuts to these commands by defining corresponding items within the editor's Shortcuts collection.

Collapse/Expand
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).
Open CS Solution
Open VB Solution
The source code files for this demo are installed (by default) in the following directories:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\ASPxHTMLEditorDemos
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\VB\ASPxHTMLEditorDemos