Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[orion-dev] Is there a sample for Orion Editor's Context Menu support?

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


Back to the top