Is it possible to Create node with default text.

53 views
Skip to first unread message

sure

unread,
Jun 8, 2009, 5:56:43 AM6/8/09
to jsTree
Hi all,
Is it possible to create a node with default text with going
to rename mode. If it is possible to do, please tell me the procedure
to do this. I am trying using this code

$.tree_focused().selected.find("a").html("myname");

with Regards
sure.

vakata

unread,
Jun 12, 2009, 12:16:36 PM6/12/09
to jsTree
Just check the docs on the create function - you can pass a string and
rename will not be fired if you do.
Regards,
Ivan

tomoguisuru

unread,
Jan 14, 2011, 12:47:08 PM1/14/11
to jst...@googlegroups.com
I'm using the "create" function as follows, but I still get the rename option.

$("#folder_tree").jstree("create", null, "last", { "data" : {"title" : "Pre Named" }, "attr" : { "rel" : this.id.toString().replace("add_", "") } });

How do I get away from it?

vakata

unread,
Jan 14, 2011, 5:01:11 PM1/14/11
to jsTree
The last parameter is skip_rename - use that - set it to true. Or you
could simply use "create_node" which is low level ... and won't show
an input box.

Kindest regards,
Ivan
Reply all
Reply to author
Forward
0 new messages