Problem removing items from the ContextMenu

Last post 10-11-2013, 5:22 PM by CTietgen. 5 replies.
Sort Posts: Previous Next
  •  10-10-2013, 1:51 PM 78094

    Problem removing items from the ContextMenu

    I am trying to remove some items from the ContextMenu, so that it mode closely resembles the toolbar buttons I have on the editor, but I have tried editing the XML files in the ContextMenuMode folder and the Common.config file in the Shared folder, but removing the items from these files doesn't remove the items from the ContextMenu.

     

    Any thoughts?

  •  10-10-2013, 3:17 PM 78095 in reply to 78094

    Re: Problem removing items from the ContextMenu

    Hi CTietgen,

     

    I thing you did not remove the correct items. Please try remove the items below.

     

    <define name="Undo" text="Undo" command="Undo" hotkey="CTRL+Z" />

    <define name="Redo" text="Redo" command="Redo" hotkey="CTRL+Y" />

    <define name="Cut" text="Cut" command="Cut" hotkey="CTRL+X" /> 

    <define name="Copy" text="Copy" command="Copy" hotkey="CTRL+C" /> 

    <define name="Paste" text="Paste" command="Paste" hotkey="CTRL+V" /> 

    <define name="Delete" text="Delete" command="Delete" hotkey="DELETE" />   

    <define name="SelectAll" text="SelectAll" command="SelectAll" hotkey="CTRL+A" /> 

     

    Regards,

     

    Ken 

  •  10-10-2013, 3:33 PM 78097 in reply to 78095

    Re: Problem removing items from the ContextMenu

    What file are those in? I removed all config files from the ContextMenuMode folder and a context menu still renders, so I am not sure where it's being built.

     

    Here's a list of everything I want to remove...

    From the Edit menu, I want to remove the following item...

    Visibile Borders


    From the Insert menu, I want to remove the following items...

    Browse Images

    FlashMedia

    Document

    Template


    From the Advanced submenu menu, under the Insert menu, I want to remove the following items...

    Insert Groupbox

    Grid Layout Panel

    The entire Forms submenu 


    I also want to remove the following menu items...

    Tags

    Verbs

  •  10-11-2013, 1:12 PM 78106 in reply to 78097

    Re: Problem removing items from the ContextMenu

    Hi,

     

    You can find the settings under "\cuteeditor_files\Configuration\ContextMenuMode\Default.xml". Please clean your browser cache after changed to try again.

     

    Below is the new code which match the requirements your sent, please try it.

     

    1. <contextmenus>  
    2.   <ref name="Undo" />  
    3.   <spliter />  
    4.   <ref name="Cut" />  
    5.   <ref name="Copy" />  
    6.   <ref name="Paste" />  
    7.   <ref name="Delete" />  
    8.   <spliter />  
    9.   <ref name="SelectAll" />  
    10.   <ref name="EditGroup" />  
    11.   <ref name="FormattingGroup" />  
    12.   <ref name="InsertGroup" />  
    13.   <special type="tags"/>  
    14.   <special type="verbs"/>  
    15.   <special type="relative"/>  
    16.   <special type="style" />  
    17.   <special type="property" />  
    18.   <define name="Undo" text="Undo" command="Undo" hotkey="CTRL+Z" />  
    19.   <define name="Redo" text="Redo" command="Redo" hotkey="CTRL+Y" />  
    20.   <define name="Cut" text="Cut" command="Cut" hotkey="CTRL+X" />  
    21.   <define name="Copy" text="Copy" command="Copy" hotkey="CTRL+C" />  
    22.   <define name="Paste" text="Paste" command="Paste" hotkey="CTRL+V" />  
    23.   <define name="Delete" text="Delete" command="Delete" hotkey="DELETE" />  
    24.   <define name="SelectAll" text="SelectAll" command="SelectAll" hotkey="CTRL+A" />  
    25.   <define name="PasteText" text="PasteText" command="PasteText" />  
    26.   <define name="PasteWord" text="PasteWord" command="PasteWord" />  
    27.   <define name="ToggleBorder" text="ToggleBorder" command="ToggleBorder" image="borders" />  
    28.   <define name="FromFullPage" text="FromFullPage" command="FullPage" hotkey="F12"  
    29.     image="restore" condition="editor.GetFullPage()" />  
    30.   <define name="ToFullPage" text="ToFullPage" command="FullPage" hotkey="F12" image="fit"  
    31.     condition="!editor.GetFullPage()" />  
    32.   <define name="Bold" text="Bold" command="Bold" hotkey="Ctrl+B" />  
    33.   <define name="Italic" text="Italic" command="Italic" hotkey="Ctrl+I" />  
    34.   <define name="Underline" text="Underline" command="Underline" hotkey="Ctrl+U" image="under" />  
    35.   <define name="StrikeThrough" text="StrikeThrough" command="StrikeThrough" image="strike" />  
    36.   
    37.   <define name="ImageGalleryByBrowsing" command="ImageGalleryByBrowsing" text="ImageBrowsing"  
    38.     image="image" />  
    39.   <define name="InsertImage" command="InsertImage" text="Image" image="eximage" />  
    40.   <define name="InsertFlash" command="InsertFlash" text="Flash" image="flash" />  
    41.   <define name="InsertMedia" command="InsertMedia" text="Media" image="media" />  
    42.   <define name="InsertDocument" command="InsertDocument" text="Document" image="document" />  
    43.   <define name="InsertTemplate" command="InsertTemplate" text="Template" image="template" />  
    44.   
    45.   <define name="InsertTable" command="InsertTable" text="Table" image="instable" />  
    46.   <define name="InsertRowTop" command="InsertRowTop" text="InsertRowTop" image="instable"/>  
    47.   <define name="InsertRowBottom" command="InsertRowBottom" text="InsertRowBottom" image="insrow_b"/>  
    48.   <define name="DeleteRow" command="DeleteRow" text="DeleteRow" image="delrow"/>  
    49.   <define name="InsertColumnLeft" command="InsertColumnLeft" text="InsertColumnLeft" image="inscol_l"/>  
    50.   <define name="InsertColumnRight" command="InsertColumnRight" text="InsertColumnRight" image="inscol_r"/>  
    51.   <define name="DeleteColumn" command="DeleteColumn" text="DeleteColumn" image="delcol"/>  
    52.   <define name="InsertCell" command="InsertCell" text="InsertCell" image="inscell"/>  
    53.   <define name="DeleteCell" command="DeleteCell" text="DeleteCell" image="delcell"/>  
    54.   <define name="EditRow" command="EditRow" text="EditRow" image="row"/>  
    55.   <define name="EditCell" command="EditCell" text="EditCell" image="cell"/>  
    56.   <define name="MergeRight" command="MergeRight" text="MergeRight" image="mrgcell_r"/>  
    57.   <define name="MergeBottom" command="MergeBottom" text="MergeBottom" image="mrgcell_b"/>  
    58.   <define name="HorSplitCell" command="HorSplitCell" text="HorSplitCell" image="spltcell_r"/>  
    59.   <define name="VerSplitCell" command="VerSplitCell" text="VerSplitCell" image="spltcell_b"/>  
    60.   
    61.   <define name="InsertHorizontalRule" command="InsertHorizontalRule" text="HorRule" image="rule" />  
    62.   <define name="InsertFieldSet" command="InsertFieldSet" text="InsertFieldSet" image="groupbox" />  
    63.   <define name="InsertGridLayoutPanel" command="InsertGridLayoutPanel" text="GridLayoutPanel" image="text" />  
    64.   <define name="InsertParagraph" command="InsertParagraph" text="Paragraph" image="-" hotkey="Ctrl+M" />  
    65.   <define name="InsertLineBreak" command="InsertLineBreak" text="LineBreak" image="-" hotkey="Shift+Enter" />  
    66.   <define name="InsertOrderedList" command="InsertOrderedList" text="OrderedList" image="-" />  
    67.   <define name="InsertUnorderedList" command="InsertUnorderedList" text="UnorderedList" image="-" />  
    68.   
    69.   <define name="InsertForm" command="InsertForm" text="InsertForm" image="form" />  
    70.   <define name="InsertInputText" command="InsertInputText" text="InsertInputText" image="textbox" />  
    71.   <define name="InsertTextBox" command="InsertTextBox" text="InsertTextBox" image="textarea" />  
    72.   <define name="InsertRadioBox" command="InsertRadioBox" text="InsertRadioBox" image="optionbutton" />  
    73.   <define name="InsertCheckBox" command="InsertCheckBox" text="InsertCheckBox" image="checkbox" />  
    74.   <define name="InsertListBox" command="InsertListBox" text="InsertListBox" image="listbox" />  
    75.   <define name="InsertDropDown" command="InsertDropDown" text="InsertDropDown" image="dropdownbox" />  
    76.   <define name="InsertInputImage" command="InsertInputImage" text="InsertInputImage" image="imagebutton" />  
    77.   <define name="InsertInputSubmit" command="InsertInputSubmit" text="InsertInputSubmit" image="submit" />  
    78.   <define name="InsertInputReset" command="InsertInputReset" text="InsertInputReset" image="Reset" />  
    79.   <define name="InsertInputReset" command="InsertInputReset" text="InsertInputReset" image="passwordfield" />  
    80.   <define name="InsertInputHidden" command="InsertInputHidden" text="InsertInputHidden" image="hiddenfield" />  
    81.   <define name="InsertInputButton" command="InsertInputButton" text="InsertInputButton" image="pushbutton" />  
    82.   
    83.   
    84.   <define name="Paste" command="Paste" text="Paste"/>  
    85.   <define name="PasteText" command="PasteText" text="PasteText"/>  
    86.   <define name="PasteWord" command="PasteWord" text="PasteWord"/>  
    87.   <define name="PasteAsHTML" command="PasteAsHTML" text="PasteAsHTML"/>  
    88.   
    89.   
    90.   <define name="EditGroup" text="Edit">  
    91.     <subItems>  
    92.       <ref name="Undo" />  
    93.       <ref name="Redo" />  
    94.       <spliter />  
    95.       <ref name="SelectAll" />  
    96.       <ref name="PasteText" />  
    97.       <ref name="PasteWord" />  
    98.       <spliter />  
    99.       
    100.       <ref name="FromFullPage" />  
    101.       <ref name="ToFullPage" />  
    102.     </subItems>  
    103.     <initializer>  
    104.       <![CDATA[ 
    105.     ]]>  
    106.     </initializer>  
    107.   </define>  
    108.   <define name="FormattingGroup" text="Formatting">  
    109.     <subItems>  
    110.       <ref name="Bold" />  
    111.       <ref name="Italic" />  
    112.       <ref name="Underline" />  
    113.       <ref name="StrikeThrough" />  
    114.     </subItems>  
    115.   </define>  
    116.   <define name="InsertGroup" text="Insert">  
    117.     <subItems>  
    118.        <ref name="InsertImage" />  
    119.       <spliter />  
    120.       <ref name="InsertTable" />  
    121.       <ref name="InsertHorizontalRule" />  
    122.       <spliter />  
    123.       <ref name="InsertAdvancedGroup"/>  
    124.       <ref name="InsertFormGroup"/>  
    125.     </subItems>  
    126.   </define>  
    127.   <define name="InsertAdvancedGroup" text="Advanced">  
    128.     <subItems>  
    129.       <ref name="InsertParagraph" />  
    130.       <ref name="InsertLineBreak" />  
    131.       <ref name="InsertOrderedList" />  
    132.       <ref name="InsertUnorderedList" />  
    133.     </subItems>  
    134.   </define>  
    135.   <define name="InsertTableGroup" text="InsertTable">  
    136.     <subItems>  
    137.       <ref name="InsertTable" />  
    138.       <ref name="InsertRowTop" />  
    139.       <ref name="InsertRowBottom" />  
    140.       <ref name="DeleteRow" />  
    141.       <ref name="InsertColumnLeft" />  
    142.       <ref name="InsertColumnRight" />  
    143.       <ref name="DeleteColumn" />  
    144.       <ref name="InsertCell" />  
    145.       <ref name="DeleteCell" />  
    146.       <ref name="EditRow" />  
    147.       <ref name="EditCell" />  
    148.       <ref name="MergeRight" />  
    149.       <ref name="MergeBottom" />  
    150.       <ref name="HorSplitCell" />  
    151.       <ref name="VerSplitCell" />  
    152.     </subItems>  
    153.   </define>  
    154.   
    155.   <define name="PasteGroup" text="Paste">  
    156.     <subItems>  
    157.       <ref name="Paste" />  
    158.       <ref name="PasteText" />  
    159.       <ref name="PasteWord" />  
    160.       <ref name="PasteAsHTML" />  
    161.     </subItems>  
    162.   </define>  
    163. </contextmenus>  
     

    Regards,

     

    Ken 

  •  10-11-2013, 2:25 PM 78111 in reply to 78106

    Re: Problem removing items from the ContextMenu

    That's the file I changed and I made pretty much the same changes you did, but the context menu still loaded the wrong items.

     

    I took your suggestion and cleared my cache, then added your XML to the Default.xml file, but the items still show on the context menu.

     

    Do you know why the context menu even renders if I delete all of the XML files form the ContextMenuMode folder? Where is it getting its data from?

  •  10-11-2013, 5:22 PM 78112 in reply to 78111

    Re: Problem removing items from the ContextMenu

    As I said above, I removed all of the XML files from the ContextMenuMode folder AND cleared the cache, but the context menu was still rendering.

     

    Well, I was AFK for an hour or so and when I cam back and refreshed the screen, I received a "Failed to load menu!" error, which makes sense. So, I copied the Default.XML file back to the folder and now it renders a context menu closer to what I am looking for using the XML you provided. Thanks!

View as RSS news feed in XML