{"action":"opened","issue":{"url":"https://api.github.com/repos/vakata/jstree/issues/1855","repository_url":"https://api.github.com/repos/vakata/jstree","labels_url":"https://api.github.com/repos/vakata/jstree/issues/1855/labels{/name}","comments_url":"https://api.github.com/repos/vakata/jstree/issues/1855/comments","events_url":"https://api.github.com/repos/vakata/jstree/issues/1855/events","html_url":"https://github.com/vakata/jstree/issues/1855","id":266371670,"number":1855,"title":"I need to do copy-paste operation JsTree?","user":{"login":"mifakam","id":20297766,"avatar_url":"https://avatars3.githubusercontent.com/u/20297766?v=4","gravatar_id":"","url":"https://api.github.com/users/mifakam","html_url":"https://github.com/mifakam","followers_url":"https://api.github.com/users/mifakam/followers","following_url":"https://api.github.com/users/mifakam/following{/other_user}","gists_url":"https://api.github.com/users/mifakam/gists{/gist_id}","starred_url":"https://api.github.com/users/mifakam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mifakam/subscriptions","organizations_url":"https://api.github.com/users/mifakam/orgs","repos_url":"https://api.github.com/users/mifakam/repos","events_url":"https://api.github.com/users/mifakam/events{/privacy}","received_events_url":"https://api.github.com/users/mifakam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-18T06:20:12Z","updated_at":"2017-10-18T06:20:12Z","closed_at":null,"author_association":"NONE","body":"I'm implementing a tree using jstree,i need to do copy-paste operation.But i'm not able to copy a node (parent with children) and paste it to one of its child node.I'm trying it using **jsTree-context-menu** plugin?Copy and paste are done, but its contents are not copied!? \r\n\r\nrequirement\r\n-----------\r\n\r\n - Node 1\r\n      - Node 2\r\n      - Node 3\r\n - Node 4\r\n\r\nAssume this is my tree.I need to copy() Node 1 and need to paste under Node 2.I'm trying it using jstree-context-menu plugin and find its not working at all.\r\n<br>So my Result Must Be With content but content is not available.\r\n \r\n\r\n - Node 1\r\n  - Node 2\r\n      - Node 1      <-----Pasted item \r\n         - Node 2\r\n         - Node 3\r\n  - Node 3\r\n - Node 4\r\n\r\n\r\n\r\nThis code for copy :\r\n\r\n    var inst = $.jstree.reference(data.reference),\r\n        obj = inst.get_node(data.reference);\r\n    if (inst.is_selected(obj)) {\r\n        inst.copy(inst.get_top_selected());\r\n    }\r\n\r\nThis code for paste :\r\n\r\n    var inst = $.jstree.reference(data.reference),\r\n     obj = inst.get_node(data.reference);\r\n     inst.paste(obj,'last');\r\n\r\nGuide me.\r\n\r\nThanks in advance!\r\n\r\n"}}
{"actor":{"display_login":"mifakam"}}