This is a migrated thread and some comments may be shown as answers.

Table context menus don't work

1 Answer 68 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 20 Sep 2008, 09:16 PM
Hello,

I seem to have some problem with table context menus. If I don't specify which toolbars to load, the html table context menu works fine (right clicking on it), but if I do it will no longer work. Here's the HTML for my rad editor:

<telerik:RadEditor ID="RadEditor1" runat="server" Skin="Outlook" NewLineBr=true  >
                <Tools>
                   <telerik:EditorToolGroup DockingZone="Bottom" > 
                       <telerik:EditorTool Name="Undo" ShortCut="CTRL+Z" />                      
                       <telerik:EditorTool Name="Redo" shortcut="CTRL+Y" /> 
                       <telerik:EditorSeparator />                  
                       <telerik:EditorTool Name="Cut" ShortCut="CTRL+X" />            
                       <telerik:EditorTool Name="Copy" ShortCut="CTRL+C" />
                       <telerik:EditorTool Name="Paste" ShortCut="CTRL+V" />
                       <telerik:EditorSeparator />
                       <telerik:EditorTool Name="PasteFromWord" /> 
                       <telerik:EditorTool Name="PasteFromWordNoFontsNoSizes" />
                       <telerik:EditorTool Name="PastePlainText" />                                         
                       <telerik:EditorTool Name="PasteAsHtml" /> 
                   </telerik:EditorToolGroup>
                  
                    <telerik:EditorToolGroup DockingZone="Bottom">
                       <telerik:EditorSeparator />
                       <telerik:EditorTool Name="InsertTable" />                      
                       <telerik:EditorTool Name="LinkManager" shortcut="CTRL+K" />
                       <telerik:EditorTool Name="LinkManager" shortcut="CTRL+SHIFT+K" /> 
                       <telerik:EditorTool Name="InsertParagraph" shortcut="CTRL+ENTER" />           
                       <telerik:EditorTool Name="InsertHorizontalRule"  />
                       <telerik:EditorTool Name="InsertSymbol" /> 
                   </telerik:EditorToolGroup> 
                  
                   <telerik:EditorToolGroup DockingZone="Bottom">
                       <telerik:EditorSeparator />
                       <telerik:EditorTool Name="FindAndReplace" shortcut="CTRL+F" />
                       <telerik:EditorTool Name="AjaxSpellCheck" />
                       <telerik:EditorTool Name="ToggleTableBorder" />
                       <telerik:EditorTool Name="ToggleScreenMode" shortcut="F11" />
                   </telerik:EditorToolGroup>                                   
                
                   <telerik:EditorToolGroup >
                       <telerik:EditorTool Name="ForeColor" />
                       <telerik:EditorTool Name="BackColor" />            
                       <telerik:EditorTool Name="FontName"  />
                       <telerik:EditorTool Name="RealFontSize" /> 
                   </telerik:EditorToolGroup>  
                  
                   <telerik:EditorToolGroup >
                       <telerik:EditorTool Name="Bold" shortcut="CTRL+B" />
                       <telerik:EditorTool Name="Italic" shortcut="CTRL+I" />
                       <telerik:EditorTool Name="Underline" shortcut="CTRL+U" />
                       <telerik:EditorSeparator />          
                       <telerik:EditorTool Name="Outdent"  />
                       <telerik:EditorTool Name="Indent" />
                       <telerik:EditorTool Name="InsertUnorderedList" />
                       <telerik:EditorTool Name="InsertOrderedList" />
                       <telerik:EditorSeparator />                      
                       <telerik:EditorTool Name="Superscript" />
                       <telerik:EditorTool Name="Subscript" />
                       <telerik:EditorTool Name="StrikeThrough" />
                       <telerik:EditorSeparator /> 
                       <telerik:EditorTool Name="FormatStripper"  />
                       <telerik:EditorSeparator /> 
                       <telerik:EditorTool Name="JustifyLeft" /> 
                       <telerik:EditorTool Name="JustifyCenter" />
                       <telerik:EditorTool Name="JustifyRight" />
                       <telerik:EditorTool Name="JustifyFull" />
                       <telerik:EditorTool Name="JustifyNone" />                    
                   </telerik:EditorToolGroup>
    
                </Tools>               
            </telerik:RadEditor>

Any ideas?

Thanks,
Chris

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 22 Sep 2008, 11:00 AM
Hi Chris,

When you customize the editor's toolbar, all editor's collections are reset and you need to create them again. Here is the original context menu configuration of RadEditor for ASP.NET AJAX which you can add to your RadEditor declaration:

<telerik:RadEditor ID="RadEditor1" runat="server">
  <ContextMenus>
    <telerik:EditorContextMenu TagName="IMG">
      <telerik:EditorTool Name="SetImageProperties" />
      <telerik:EditorTool Name="ImageMapDialog" />
    </telerik:EditorContextMenu>
    <telerik:EditorContextMenu TagName="TABLE">
      <telerik:EditorTool Name="ToggleTableBorder" />
      <telerik:EditorTool Name="SetTableProperties" />
      <telerik:EditorTool Name="DeleteTable" />
    </telerik:EditorContextMenu>
    <telerik:EditorContextMenu TagName="TD">
      <telerik:EditorTool Name="InsertRowAbove" />
      <telerik:EditorTool Name="InsertRowBelow" />
      <telerik:EditorTool Name="DeleteRow" />
      <telerik:EditorTool Name="InsertColumnLeft" />
      <telerik:EditorTool Name="InsertColumnRight" />
      <telerik:EditorTool Name="MergeColumns" />
      <telerik:EditorTool Name="MergeRows" />
      <telerik:EditorTool Name="SplitCell" />
      <telerik:EditorTool Name="DeleteCell" />
      <telerik:EditorTool Name="SetCellProperties" />
    </telerik:EditorContextMenu>
    <telerik:EditorContextMenu TagName="A">
      <telerik:EditorTool Name="SetLinkProperties" />
      <telerik:EditorTool Name="Unlink" />
    </telerik:EditorContextMenu>
    <telerik:EditorContextMenu TagName="BODY">
      <telerik:EditorTool Name="Cut" />
      <telerik:EditorTool Name="Copy" />
      <telerik:EditorTool Name="Paste" />
      <telerik:EditorTool Name="PasteFromWord" />
      <telerik:EditorTool Name="PastePlainText" />
      <telerik:EditorTool Name="PasteAsHtml" />
    </telerik:EditorContextMenu>
  </ContextMenus>
</telerik:RadEditor>

Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Chris
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or