This command creates a new node in a specified parent. the node id can either be set explicitly or a placeholder variable can be used, which can then in the same command string be used, instead of node id, in commands after the create command.
create <node id|placeholder> <parent node id> <before id>
If the parent node id
does not exist an error is returned.
The node will be inserted in the child list of the parent, before the before id
. It can be -1, meaning “insert last”.
Placeholder example - create new node as child of node 2 and set its title to “Helo”, and then “Hello”:
create x 2 -1; update x title "Helo"; update x title "Hello"
Multiple placeholders example - create two new nodes as children of node 2 and set their titles to “Hello1”, and then “Hello2”:
create x 2 -1; create y 2 -1; update x title "Hello1"; update y title "Hello2"