Context Menu on an editor

Hello All

I have a need to attach a context menu to an editor page but there is no attach context menu function in the api for the editor like there is for grid and others. does anyone have any ideas on how to get round this issue ?

Cheers
Philip White

Hello,

Editor consists of an iframe where a user can type. editor.edDoc is document of this iframe, editor.edWin - contentWindow property.

Here is the example how to show dhtmlxMenu:

editor.edDoc.body.oncontextmenu = function(e) {
var e = (e||editor.edWin.event);
menu.showContextMenu(e.clientX,e.clientY)
e.cancelBubble = true;
e.returnValue = false;
return false;
}

Not sure that this approach will work in any browser - you may your own method.

Hi Alexandra

thanks for the reply It works in chrome and chromium which is what I needed

Cheers
Philip White