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

Right-click context menus not available in Editor

2 Answers 152 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 12 Aug 2008, 07:59 AM
I am using the latest RadControls for Ajax (RadControls_for_ASP[1].NET_AJAX_2008_2_723_dev.exe)

I have added an Eitor control to my page and added an Insert Table Control to the Toolbar. I want the user to be able to insert a table then right-click on the table to add a new row etc.

This does not work.

However, if I add another Editor Control to the page with an empty Tools Collection, a default set of tools is added at run-time (including the Add Table control) and in this case I CAN insert a table and I CAN display a context menu by right-clicking the inserted table.

Can you advise me how I can get the context menu to work in the first scenario?

<

body>

<form id="form1" runat="server">

<div>

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">

</telerik:RadScriptManager>

<br />

<%

-- Context menu DOES work --%>

<telerik:RadEditor ID="RadEditor1" runat="server">

</telerik:RadEditor>

<%

-- xxxxxxxxxxxxxx --%>

<br />

<%

-- Context menu DOESN'T work --%>

<telerik:RadEditor ID="RadEditor2" runat="server">

<Tools>

<telerik:EditorToolGroup Tag="new">

<telerik:EditorTool Name="InsertTable" />

</telerik:EditorToolGroup>

</Tools>

<Content>

</Content>

</telerik:RadEditor>

<%

-- xxxxxxxxxxxxxx --%>

<br />

</div>

</form>

</

body>

2 Answers, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 12 Aug 2008, 09:13 AM
Hello Peter,

This is a optimization loading change introduced in the latest version of RadEditor. If you decide to create a custom toolbar, this will automatically reset also the context menus too. For your convenience I have wrote below all default context menus of RadEditor:

<telerik:radeditor runat="server" ID="RadEditor1"></telerik:radeditor>
<telerik:radeditor runat="server" ID="RadEditor2">
<Tools>
    <telerik:EditorToolGroup>
        <telerik:EditorTool Name="InsertTable" />
    </telerik:EditorToolGroup>
</Tools>
  <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>




All the best,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Peter
Top achievements
Rank 1
answered on 12 Aug 2008, 09:26 AM
Thank you for your lightning response (and solution)!
Tags
Editor
Asked by
Peter
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Peter
Top achievements
Rank 1
Share this question
or