RichTextEditor is a context sensitive application, it is aware of it's context and acts accordingly. Many functions of RichTextEditor are accessible via the context menus (accessible through a right-click menu in the content area). This section describes how to control the context menu behavior in a RichTextEditor control. There are many ways to control the context menu behaviors within RichTextEditor:

Disabling the context menu.
Loading the different configuration file dynamically using Editor.ContextMenuMode property.
Editing the context menu configuration files directly.

Disabling the Default Context Menu

To turn off context menus, you can set Editor.EnableContextMenu Property to false.

Loading the different configuration file dynamically using Editor.ContextMenuMode property.

<RTE:Editor runat="server" ID="Editor1" ContextMenuMode="default" />
<RTE:Editor runat="server" ID="Editor1" ContextMenuMode="simple" />
<RTE:Editor runat="server" ID="Editor1" ContextMenuMode="minimal" />

Editing the context menu configuration files directly.

The context menu definition files (menu_context.xml, menu_context_default.xml, menu_context_minimal.xml and menu_context_simple.xml) can be found in the richtexteditor/dialogs folder. The context menu definition influences the available context menu items and the order of the context menu items. You can easily customize the context menu to address your unique needs.

A context menu definition file example:

<?xml version="1.0" encoding="utf-8" ?>
<jsml xmlns=""
xmlns:xsi="" xsi:schemaLocation=" ../core/jsml.xsd">

	<panel jsml-class="menu_context_table" jsml-base="floatmenu">

		<panel jsml-base="rtemenuitem" command="mergecells" imagename="mrgcell" htmlcode="@MERGECELLS" />
		<panel jsml-base="rtemenuitem" command="splitcells" imagename="spltcell" htmlcode="@SPLITCELLS" />
		<panel jsml-base="rtemenuspliter" />
		<panel jsml-base="rtemenuitem" command="deleterow" htmlcode="@DELETEROW" imagename="delrow"  />
		<panel jsml-base="rtemenuitem" command="deletecolumn" htmlcode="@DELETECOLUMN" imagename="delcol"  />
		<panel jsml-base="rtemenuitem" command="insertrowtop" htmlcode="@INSERTROWTOP" imagename="insrow_t"  />
		<panel jsml-base="rtemenuitem" command="insertrowbottom" htmlcode="@INSERTROWBOTTOM" imagename="insrow_b"  />
		<panel jsml-base="rtemenuspliter" />
		<panel jsml-base="rtemenuitem" command="insertcolumnleft" htmlcode="@INSERTCOLUMNLEFT" imagename="inscol_l"  />
		<panel jsml-base="rtemenuitem" command="insertcolumnright" htmlcode="@INSERTCOLUMNRIGHT" imagename="inscol_r" />



Send feedback about this topic to CuteSoft. © 2003 - 2018 CuteSoft Components Inc. All rights reserved.