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

Context Menu Customization

  • Undopo
    Undo
  • Cut
    Clipboardpo
    Clipboard
  • v
    v
    po
    po
    po
    Fontpo
    dialogboxlauncherFont
  • po
    po
    Paragraphpo
    dialogboxlauncherParagraph
  • Stylespo
    Styles
  • Editing
  • Table Style Optionspo
    Table Style Options
  • Table Stylespo
    Table Styles
  • v
    v
    Borders & Shadingspo
    dialogboxlauncherBorders & Shadings
  • Navigation
  • Options
  • Header from Top:
    +
    -
    Footer from Bottom:
    +
    -
    Positionpo
    Position
  • Close
  • v
    Shape Stylespo
    Shape Styles
  • dialogboxlauncherArrange


The ASP.NET MVC Rich Text Editor (RichEdit extension) enables you to customize its context menu. By handling the PopupMenuShowing client-side event, you can perform the following actions with the ASPxRichEdit's context menu

  • Manipulate menu items - add new items, remove or disable existing ones (use the e.menuItems property);
  • Prevent the context menu from being displayed (use the e.cancel property).

In this demo, the PopupMenuShowing event is handled to illustrate the context menu customizing capabilities. Using check boxes, you can switch the context menu availability (via e.cancel) and control whether to clear or retain the default menu items when populating the menu with custom items (via e.menuItems). The custom items are implemented as ASPxClientRichEditPopupMenuItem objects by their name property. Clicks on custom menu items are processed using the CustomCommandExecuted client event. Its handler identifies the activated item by its name and performs the corresponding action on the client-side. In this demo, custom menu items create the Date and Time fields (using the createDateField and createTimeField client commands) and search the selected text in Google (the selected text is received via the Client API).