[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [orion-dev] Is there a sample for Orion Editor's Context Menu support?
|
You will not be able to add menu items
directly to the user agent context menu unless you use browser specific
APIs. Something like:
https://hacks.mozilla.org/2011/11/html5-context-menus-in-firefox-screencast-and-code/
Another option is to prevent the user
agent menu from showing and render your own menu using HTML/CSS/JS or your
favorite library (dojo, jQuery, etc). Something like:
onContextMenu: function(e) {
e.preventDefault();
// render your
menu here
}
Silenio
From:
Pankaj Dhoolia <pdhoolia@xxxxxxxxxx>
To:
"Orion developer
discussions" <orion-dev@xxxxxxxxxxx>,
Date:
08/02/2013 09:28 AM
Subject:
[orion-dev]
Is there a sample for Orion Editor's Context Menu
support?
Sent by:
orion-dev-bounces@xxxxxxxxxxx
I need some help in adding a context menu
to the Orion Editor (for my usecase).
I am able to follow things till here :
this. _listener = {
...
onContextMenu: function(e) {
//
TODO: add context-menu-items and their handlers here.
}
}
textView.addEventListener("ContextMenu",
this._listener.onContextMenu);
But beyond that, I can't quite find any
samples or API that demonstrates how to add context-menu-items and their
handlers. Is there no direct support for ContextMenu.
I came across Mozilla/DevTools/ScratchPad.
But they seem to be using mozilla libraries/specific ways of constructing
the ContextMenu.
Would appreciate any help / pointers
to samples.
thanks!
-- Pankaj_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev