Configuring jstree right-click contextmenu for different node types

前端 未结 8 2309
甜味超标
甜味超标 2020-12-04 07:29

I\'ve seen an example somewhere online showing how to customise the appearance of jstree\'s right-click context menu (using contextmenu plugin).

For example, allow

8条回答
  •  独厮守ぢ
    2020-12-04 07:44

    I have adapted the suggested solution for working with types a bit differently though, perhaps it can help someone else:

    Where #{$id_arr[$k]} is the reference to the div container... in my case I use many trees so all this code will be the output to the browser, but you get the idea.. Basically I want all the context menu options but only 'Create' and 'Paste' on the Drive node. Obviously with the correct bindings to those operations later on:

提交回复
热议问题