Table of Contents
- Getting Started
- EO.Pdf
- EO.Web
- Overview
- Installation & Deployement
- EO.Web ToolTip
- EO.Web Rating
- EO.Web Slider & RangeSlider
- EO.Web ListBox
- EO.Web ComboBox
- EO.Web Captcha
- EO.Web ASPX To PDF
- EO.Web Slide
- EO.Web Flyout
- EO.Web EditableLabel
- EO.Web ImageZoom
- EO.Web Floater
- EO.Web Downloader
- EO.Web ColorPicker
- EO.Web HTML Editor
- EO.Web File Explorer
- EO.Web SpellChecker
- EO.Web Grid
- EO.Web MaskedEdit
- EO.Web Splitter
- EO.Web Menu
- EO.Web Slide Menu
- EO.Web TabStrip
- EO.Web TreeView
- EO.Web Calendar
- EO.Web Callback
- EO.Web MultiPage
- EO.Web Dialog
- EO.Web AJAXUploader
- EO.Web ProgressBar - Free!
- EO.Web ToolBar - Free!
- EO.WebBrowser
- EO.Wpf
- Common Topics
- Reference
Customizing Context Menu |
EO.Web Editor provides ContextMenuID property through which you can specify a custom context menu for the editor.
Context Menu Items
A context menu can carry out a built-in or custom command. When using built-in command, it is associated with a pre-defined command through the menu item's ItemID property. For example, the following menu item is associated with InsertOrEditLink command:
<eo:MenuItem ItemID="InsertOrEditLink" Text-Html="Edit Link"></eo:MenuItem>
Each menu item is automatically displayed or hidden according to the current context. For example, the above menu item would be visible only if the current edit point is inside a HTML link element.
A context menu can also be associated with a custom command by setting it its ItemID to a string that starts with "custom:". When an item is associated with a custom command, the editor does not automatically enable/disables the item, nor does it carry out any action when the item is clicked. You must handle the menu item's client side event to carry out the corresponding logics by yourself. For example, the following menu item set the item's OnClickScript to insert text to the editor:
<eo:MenuItem ItemID="custom:insertABC" Text-Html="Insert 'ABC'" OnClickScript="eo_GetObject('Editor1').execCommand('InsertHTML', 'abc');" ></eo:MenuItem>
The appearance of the menu and menu items is customized on the ContextMenu control.