Skip to main content
A newer version of this page is available. .

CustomCommandExecutedEvent Class

An event that occurs after a custom command has been executed on the client side.

Declaration

export class CustomCommandExecutedEvent extends RichEditEvent<CustomCommandExecutedEventArgs>

Remarks

You can define the CustomCommandExecuted event handler either at the server side, at the client side, or at runtime.

Use the OnCustomCommandExecuted(String) method to specify the event handler.

@(Html.DevExpress().RichEdit("richEdit")
 .OnCustomCommandExecuted("function(s,e) {
   switch (e.commandName) {
     case 'sendEmail':
       var text = s.document.getText();
       var mailto_link = 'mailto:bob@example.com?subject=Test&body=' + encodeURIComponent(text);
       window = window.open(mailto_link, 'emailWindow');
       if(window && window.open && !window.closed)
         window.close();
       break;
   }
 }")
 // ...

The event handler receives an argument of the CustomCommandExecutedEventArgs type. The argument’s properties provide information specific to this event.

Inheritance

See Also