Copy command

how to achieve Copy command in dhtmlx tree, current we have only Cut & Paste commands in dhtmlx


There are insertNewItem and insertNewChild methods. They allow to insert new item.


The label of the copying item can be easily got by getItemText method.


So, you can combine insertNewChild with getItemText - and you’ll get “copy”.


But please remember that item ids must be unique (the id of the new item must be different from existent in tree).