Closed sdusa-o closed 2 years ago
I don't know for the default context menu. If you use a custom context menu, you have to set the icon
option, e.g.
contextMenu = {
items: function customMenu(node) {
var tree = $("#mytree").jstree(true);
var items = {
rename: {
label: "Rename",
action: function (obj) {
tree.edit(node);
},
icon: "glyphicon glyphicon-edit"
},
delete: {
label: "Delete",
action: function (obj) {
tree.delete_node(node);
},
icon: "glyphicon glyphicon-trash"
},
create: {
label: "Create",
action: function (obj) {
tree.create_node(node);
},
icon: "glyphicon glyphicon-plus"
}
};
return items;
}
};
Thank you @stla
How can I remove the empty space? I don't need an icon or its space left behind.
It seems $.vakata.context.icons should be false. How can I do that from outside?
$.vakata.context = {
settings : {
hide_onmouseleave : 0,
icons : true
},
When I use the default context menu, there are no icons for Cut, Copy, Delete and so on. There is space on the left side, but no icons. How do I add/enable those icons? Thanks.