Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
325
Turn off Modify Image right click?
posted

Is there a property to turn off the right click modify image menu item when you right click an image?

  • 24497
    posted

    Hi,

    There is no property. You have 2 options:

    1. remove InsertImage from RightClickMenu (line similar to)
    <ighedit:HtmlBoxMenuItem runat="server" Act="InsertImage"></ighedit:HtmlBoxMenuItem>

    2. process ClientSideEvents.BeforeAction and cancel action which happens on that particular event. Below is example to implement.

    <script type="text/javascript">
    function
    WebHtmlEditor1_BeforeAction(oEditor, actID, oEvent, p4, p5, p6, p7, p8, act)
    {
     
    if(actID != 'RightClick' || act != 'pop') return;
     
    // next block is optional
     
    if(p6)
     {
     
    var src = p6.srcElement;
     
    if(!src)
        src = src.target;
     
    if(src && src.nodeName != 'IMG')
       
    return;
     }
     oEvent.cancel =
    true;
    }
    </script>