Add custom context menu item dynamically
See original GitHub issueIs it possible to add context menu items after plugin initialization? Something like that
$tree.jstree().contextmenu.add(definition);
Issue Analytics
- State:
- Created 8 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Dynamically Adding a Context Menu Item with a Click Handler ...
I have a list view with a context menu. I am looking to dynamically add an item which has a click event. As...
Read more >Dynamically add custom context menu to the nodes - GoJS
I want to show context menu on the node displayed in the diagram as per its Name property. I looked into some samples...
Read more >Dynamic Multi-level Context Menu With JavaScript - CSS Script
A simple, plain, multi-level context menu component implemented in vanilla JavaScript. No third-party framework and stylesheet required.
Read more >Menus - Android Developers
To define the menu, create an XML file inside your project's res/menu/ directory and build the menu with the following elements: <menu>: Defines ......
Read more >ContextMenu / How To / Change menu items dynamically
Change menu items dynamically in JavaScript ContextMenu control ... The items visible in the ContextMenu can be changed dynamically based on the target...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@vakata I would seriously suggest modifying jsTree’s source something like the following :-
And have the jsTree source call contextmenu.items if its a function otherwise call contextmenu.fn otherwise use the contextmenu.items object as a menu object. This would then give the best of all worlds.
our way here: http://javafoot.net/index.php/en/48-add-customized-menu-items-to-jstree-contextmenu