Hi
Firstly tks for a great tool and the effort involved.
Using jsTree 3.0.0 (Beta 9) , I am having a problem with renaming a node. I can get it to go to 'edit' mode when I right-click and rename. But when I enter to accept new text value, it simply reverts to the original value.
I also get no rename.jstree (or rename_node.jstree) event firing.
I have put an example together at
http://jsfiddle.net/ajpc6996/Amg2k/11/I was using the standard ContextMenu, but have restricted it to just "Rename" for this fiddle.
My code is below
$('#treeTest').jstree({
"core": {
"data": [{"id":"1","text":"Node1"},{"id":"2","text":"Node2"}]
},
"contextmenu" : {
"items" : function ($node) {
return {
"Rename" : {
"label" : "Rename",
"action" : function (data) {
var inst = $.jstree.reference(data.reference),
obj = inst.get_node(data.reference);
inst.edit(obj);
}
}
};
}
},
"plugins" : [ "themes", "dnd", "search", "types", "contextmenu", "crrm" ]
}).bind("rename_node.jstree", function (event, data) {
alert(event.type);
});
Has anyone got any pointers or advice as to where I'm going wrong ? Any assistance will be valued !
Regards,
Alfred