Hi,
Is there any way to show the default IE context menu when the user right clicks in the editor? I don't want a custom context menu, just the default context menu. The client has a rather rich IE context menu with customizations from add-ons and in the radeditor the menu is not shown. I have tried disabling the editor context menus but still nothing shows.
Thank you.
Michael
Is there any way to show the default IE context menu when the user right clicks in the editor? I don't want a custom context menu, just the default context menu. The client has a rather rich IE context menu with customizations from add-ons and in the radeditor the menu is not shown. I have tried disabling the editor context menus but still nothing shows.
Thank you.
Michael
6 Answers, 1 is accepted
0
Accepted
Hi,
If you want to enable the default browser's content menu and disable the built-in context menus of RadEditor, you can do that using the following JavaScript code:
Regards,
Rumen
the Telerik team
If you want to enable the default browser's content menu and disable the built-in context menus of RadEditor, you can do that using the following JavaScript code:
<script type=
"text/javascript"
>
function
OnClientLoad(editor) {
editor.get_toolAdapter().enableContextMenus(
false
);
}
</script>
<telerik:RadEditor ID=
"RadEditor"
OnClientLoad=
"OnClientLoad"
runat=
"server"
/>
Regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Michael
Top achievements
Rank 1
answered on 31 Jul 2012, 10:34 AM
Hi Rumen,
That works greatly in showing the default IE context menu. However it also removes the customizations the client has on those menus and shows simply the classic menus. Any thoughts on how to fix that?
Regards,
Michael
That works greatly in showing the default IE context menu. However it also removes the customizations the client has on those menus and shows simply the classic menus. Any thoughts on how to fix that?
Regards,
Michael
0
Hi,
Could you please be more specific and provide screenshot or video demonstrating the customized context menus of your client? The code just disables the RadEditor's context menus and does not alter the browser's ones.
All the best,
Rumen
the Telerik team
Could you please be more specific and provide screenshot or video demonstrating the customized context menus of your client? The code just disables the RadEditor's context menus and does not alter the browser's ones.
All the best,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Michael
Top achievements
Rank 1
answered on 01 Aug 2012, 05:17 PM
Hi Rumen,
I have been able to resolve it with a combination of your script and setting the editor content area mode to Div. It seems to not work with i-frames I suppose the custom menus recognize the area differently.
Thank you for your help.
Regards,
Michael
I have been able to resolve it with a combination of your script and setting the editor content area mode to Div. It seems to not work with i-frames I suppose the custom menus recognize the area differently.
Thank you for your help.
Regards,
Michael
0
Hareesh
Top achievements
Rank 1
answered on 22 Feb 2013, 10:36 AM
Hi Rumen,
In RadEditor i have created a context menu
--------------------------------------------------------------
<ContextMenus>
<Telerik:EditorContextMenu Enabled="True" TagName="P" >
<Telerik:EditorTool Text="Compare" Name="comapre" ShowIcon="true" ImageUrl="../Images/Compare.ico" />
</Telerik:EditorContextMenu>
</ContextMenus>
------------------------------------------------------------------------------
calling that context menu item from java script-------in this i am calling serverside button click
function OnClientCommandExecuting(commandName, editor, args)
{
Telerik.Web.UI.Editor.CommandList["comapre"] = function (commandName, editor, args) {
//var editor = $find("<%=RadEditor1.ClientID%>");
var selection = editor.getSelectionHtml();
var elem = editor.getSelectedElement();
if (elem.tagName == "P") {
document.getElementById("hf1").value = selection;
var clickButton = document.getElementById("<%= btnCompare.ClientID %>");
clickButton.click();
}
};
}
All this is working fine in fire fox and chrome,but when comes to IE it is showing context menu for right click,next time right clicks default context menu is displaying ,i need to display custom context menu.................
In RadEditor i have created a context menu
--------------------------------------------------------------
<ContextMenus>
<Telerik:EditorContextMenu Enabled="True" TagName="P" >
<Telerik:EditorTool Text="Compare" Name="comapre" ShowIcon="true" ImageUrl="../Images/Compare.ico" />
</Telerik:EditorContextMenu>
</ContextMenus>
------------------------------------------------------------------------------
calling that context menu item from java script-------in this i am calling serverside button click
function OnClientCommandExecuting(commandName, editor, args)
{
Telerik.Web.UI.Editor.CommandList["comapre"] = function (commandName, editor, args) {
//var editor = $find("<%=RadEditor1.ClientID%>");
var selection = editor.getSelectionHtml();
var elem = editor.getSelectedElement();
if (elem.tagName == "P") {
document.getElementById("hf1").value = selection;
var clickButton = document.getElementById("<%= btnCompare.ClientID %>");
clickButton.click();
}
};
}
All this is working fine in fire fox and chrome,but when comes to IE it is showing context menu for right click,next time right clicks default context menu is displaying ,i need to display custom context menu.................
0
Hi,
I was unable to reproduce the reported issue using the provided code. You can see how it works at my end in this video: http://screencast.com/t/ELmB9IC3XVc.
Greetings,
Rumen
the Telerik team
I was unable to reproduce the reported issue using the provided code. You can see how it works at my end in this video: http://screencast.com/t/ELmB9IC3XVc.
Greetings,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.