Change Theme Settings
Change Theme Settings
Themes
 
Metropolis
Moderno
iOS
Material
Material Compact
Office 365
Mulberry
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.