Configuring jstree right-click contextmenu for different node types

前端 未结 8 2310
甜味超标
甜味超标 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:57

    To clear everything.

    Instead of this:

    $("#xxx").jstree({
        'plugins' : 'contextmenu',
        'contextmenu' : {
            'items' : { ... bla bla bla ...}
        }
    });
    

    Use this:

    $("#xxx").jstree({
        'plugins' : 'contextmenu',
        'contextmenu' : {
            'items' : customMenu
        }
    });
    

提交回复
热议问题