ASP.NET 3.5 and above only

Obout.Ajax.UI Controls - HTML Editor - Server side

Obout.Ajax.UI.HTMLEditor.ContextMenu.DefaultContextMenu class

 Inheritance Hierarchy

<%@ Register Assembly="Obout.Ajax.UI" Namespace="Obout.Ajax.UI.HTMLEditor.ContextMenu" TagPrefix="obout" %>

By default this control is used as a context menu for the EditorEditPanel control.

Public properties

Name Description
propertyAddItems Collection<ContextMenu.DesignModeItem> overridable. Gets the context menu items added by user. (Inherited from ContextMenu.ContextMenu.)
Default empty.
propertyClientID String. Gets the server control identifier generated by ASP.NET. (Inherited from Control.)
propertyEditPredefinedItems Collection<ContextMenu.DesignModeItem>. Gets the items to be edited in the predefined items collection. (Inherited from ContextMenu.ContextMenu.)
Default empty.

See ASP.NET code of the online example.
propertyID String. Gets or sets the programmatic identifier assigned to the server control. (Inherited from Control.)
propertyIgnoreTab Bool. Gets or sets a value indicating whether to ignore the default 'Tab' key navigation for all buttons (tabIndex = -1). (Inherited from Toolbar.)
Default false.
propertyIgnoreVerticalSeparators Bool. Gets or sets a value indicating whether to ignore vertical separators. (Inherited from Toolbar.)
Default false.
propertyItemsTemplate String. Gets or sets the file name of the template with the predefined items. (Inherited from ContextMenu.ContextMenu.)
Items described in this template only can appear in the context menu.

Example:
ItemsTemplate="~/App_Obout/HTMLEditor/XML/ItemsSet1.xml"

If the file extension is absent then .xml extension will be used by default.

Example:
ItemsTemplate="~/App_Obout/HTMLEditor/XML/ItemsSet1"

Also you can use the file name only without path prefix. In this case the value of the TemplatesFolder property will be used as the path prefix (default "~/App_Obout/HTMLEditor/XML/").

Full example:
<obout:Editor runat="server" Id="editor" Height="500px" Width="100%"
                    EditPanel-ContextMenu-ItemsTemplate="ItemsSet1">


Example of the template XML file:

<PredefinedItems

<!-- The following items only can be present in the context menu -->

<item name="RemoveLinkItem" /> <!-- Remove link -->

<item name="EditTableItem" /> <!-- Edit Table's properties -->

<item name="EditCellItem" /> <!-- Edit Table cell's properties -->

<item name="EditImageItem" /> <!-- Edit Image's properties -->

<item name="SelectAllItem" /> <!-- Select the whole content -->

</PredefinedItems>
propertyKeepPaternity Bool. Gets or sets a value indicating whether to keep paternity of the contextmenu on open. (Inherited from ContextMenu.ContextMenu.)
Default false.
propertyPopupHolderID String. Gets or sets the associated Popup Holder ID. (Inherited from Toolbar.)
propertyPreservePlace Bool. Gets or sets a value indicating whether to preserve buttons' space when invisible. (Inherited from Toolbar.)
Default false.

See online example.
propertyRemovePredefinedItems Collection<ContextMenu.DesignModeItem>. Gets the items to be removed from the predefined items collection. (Inherited from ContextMenu.ContextMenu.)
Default empty.

Example:

<%@ Register Assembly="Obout.Ajax.UI" TagPrefix="obout" Namespace="Obout.Ajax.UI.HTMLEditor" %>
<%@
Register Assembly="Obout.Ajax.UI" TagPrefix="obout" Namespace="Obout.Ajax.UI.HTMLEditor.ContextMenu" %>
...
<obout:Editor runat="server" Id="editor" Height="300px" Width="100%">
   <
EditPanel>
      <
ContextMenu>
         <
RemovePredefinedItems>
            <
obout:RemoveImageItem />
         </
RemovePredefinedItems>
      </
ContextMenu>
   </
EditPanel>
</
obout:Editor>
propertyShowDisabledItems Bool. Gets or sets a value indicating whether to show disabled items. (Inherited from ContextMenu.ContextMenu.)
Default true.
propertyStyleFile String. Gets or sets a style file path. (Inherited from Toolbar.)

Example:
myContextMenu.StyleFile = "~/GlobalStyles/MyContextMenu.css"

See online example.
propertyTemplatesFolder String. Gets or sets the Url of the default templates folder. (Inherited from Toolbar.)
Default "~/App_Obout/HTMLEditor/XML/"
propertyUsePredefinedItems Bool. Gets or sets a value indicating whether to use the predefined items set. (Inherited from ContextMenu.ContextMenu.)
Default true.

Public methods

Name Description
property Collection<ToolbarButton.CommonButton> GetButtonsByType(Type type) Gets a collection of buttons in this toolbar with the specified type. (Inherited from Toolbar.)

See online example.

Protected properties

Name Description
propertyPopupHolder Obout.Ajax.UI.HTMLEditor.PopupHolder overridable. Gets or sets the associated Popup Holder control. (Inherited from Toolbar.)
propertyPredefinedItems Collection<ContextMenu.DesignModeItem> overridable. Gets the context menu predefined items. (Inherited from ContextMenu.ContextMenu.)
By default this collection is filled with all available menu items, see Predefined items.
If the ItemsTemplate property is set, then this collection is filled with menu items described in the template.

"I have evaluated your Suite before we make a decision but it is pretty superior."

John Russel

Random testimonial   All testimonials