Customize the right click menu

Last post 06-24-2009, 1:21 PM by Adam. 1 replies.
Sort Posts: Previous Next
  •  06-24-2009, 10:19 AM 53464

    Customize the right click menu

    Second request... some custimization questions:
     
    1. is there a way i can customize the mouse-right click menu and also how do I detect the editor/document element the user has clicked/selected when they enter the mouse-right click menu?
     
    2. How can I add more fonts to the 'Default Font 'drop down?
  •  06-24-2009, 1:21 PM 53476 in reply to 53464

    Re: Customize the right click menu

    1.
     

    How To Control the Context Menu in CuteEditor?   

    Cute Editor is a context sensitive application, it is aware of it's context and acts accordingly. Many functions of CuteEditor 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 Cute Editor control. 


    There are many ways to control the context menu behavior in a Cute Editor control:


    1. Disable the default context menu.
    2. Disable the default context menu of the browser
    3. Load the different configuration file dynamically using Editor.ContextMenuMode property.
    4. Disable the context menu group by modifying the context menu configuration files.
    5. Change the available context menu items and the order of the items by editing context menu definition file.
    6. Change the available context menu items and the order of the items by editing context menu definition file.


    1. Disable the Default Context Menu



    To turn off context menus, you can choose one of the following methods:


    1. Using the Editor.EnableContextMenu Property to specify whether the context menu is enabled.

    2. Edit context menu configuration files .

    All the context menu configuration files can be found in the /CuteEditor/Configuration/ContextMenuMode folder. In the context menu configuration files, you can find the contextmenu element which contains the configuration information for the context menus within CuteEditor.

    To turn off context menus, you need to disable all of the context menu groups.

    Example:


    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <!--definition see shared/common.config-->
     <contextmenus>
      <ref name="Undo" />
      <spliter />
      <ref name="Cut" />
      <ref name="Copy" />
      <ref name="Paste" />
      <ref name="Delete" />
      <spliter />
      <ref name="SelectAll" />
      <ref name="EditGroup" />
      <ref name="FormattingGroup" />
      <ref name="InsertGroup" />
      <special type="tags"/>
      <special type="verbs"/>
      <special type="relative"/>
      <special type="style" />
      <special type="property" />
     </contextmenus>
    </configuration>



    2. Disable the default context menu of the browser



    To turn off context menus of the browser, you need to set Editor.EnableBrowserContextMenu Property to false.

    Example:


               editor.EnableContextMenu = "false";
               editor.EnableBrowserContextMenu = "false";

    3. Load the different configuration file dynamically using Editor.ContextMenuMode property.



    Example:


               editor.ContextMenuMode = "Simple";

    4. Disable the context menu group by modifying the context menu configuration files


    For example, to disable edit group menu, you need to remove the following code:


      <ref name="EditGroup" />

    5. Modify the context menu definition file.



    The context menu definition file (Common.config) can be found in the /CuteEditor/Configuration/Shared 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.

     

    For example, to modify EditGroup menu, you need to change the following code:


     <define name="EditGroup" text="[[Edit]]">
       <subItems>
        <ref name="Undo" />
        <ref name="Redo" />
        <spliter />
        <ref name="SelectAll" />
        <ref name="PasteText" />
        <ref name="PasteWord" />
        <spliter />
        <ref name="ToggleBorder" />
        <ref name="FromFullPage" />
        <ref name="ToFullPage" />
       </subItems>
       <initializer>
       <![CDATA[
       ]]>
       </initializer>
      </define>
     
    2.
     


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML