{"action":"created","issue":{"url":"https://api.github.com/repos/vakata/jstree/issues/2115","repository_url":"https://api.github.com/repos/vakata/jstree","labels_url":"https://api.github.com/repos/vakata/jstree/issues/2115/labels{/name}","comments_url":"https://api.github.com/repos/vakata/jstree/issues/2115/comments","events_url":"https://api.github.com/repos/vakata/jstree/issues/2115/events","html_url":"https://github.com/vakata/jstree/issues/2115","id":362044113,"node_id":"MDU6SXNzdWUzNjIwNDQxMTM=","number":2115,"title":"Not able to add a custom <a><i></i><a> element in the jstree","user":{"login":"Mudit-Garg","id":42021057,"node_id":"MDQ6VXNlcjQyMDIxMDU3","avatar_url":"https://avatars1.githubusercontent.com/u/42021057?v=4","gravatar_id":"","url":"https://api.github.com/users/Mudit-Garg","html_url":"https://github.com/Mudit-Garg","followers_url":"https://api.github.com/users/Mudit-Garg/followers","following_url":"https://api.github.com/users/Mudit-Garg/following{/other_user}","gists_url":"https://api.github.com/users/Mudit-Garg/gists{/gist_id}","starred_url":"https://api.github.com/users/Mudit-Garg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mudit-Garg/subscriptions","organizations_url":"https://api.github.com/users/Mudit-Garg/orgs","repos_url":"https://api.github.com/users/Mudit-Garg/repos","events_url":"https://api.github.com/users/Mudit-Garg/events{/privacy}","received_events_url":"https://api.github.com/users/Mudit-Garg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-20T06:59:37Z","updated_at":"2018-09-20T09:04:28Z","closed_at":"2018-09-20T07:48:20Z","author_association":"NONE","body":"I was trying to add my own element inside jstree using a custom plugin .This is the code for the same:\r\n\r\n```js\r\n/*global jQuery */\r\n// wrap in IIFE and pass jQuery as $\r\n(function ($, undefined) {\r\n\t\"use strict\";\r\n\r\n\t var _aEdit = document.createElement('A');\r\n\t _aEdit.className = 'editFolder';\r\n\t//  _aEdit.attributes('href', \"#\");\r\n\tvar _iEdit = document.createElement(\"I\");\r\n\t_iEdit.className = 'jstree-icon jstree-themeicon';\r\n\t     _aEdit = _aEdit.appendChild(_iEdit);\r\n\r\n\t$.jstree.plugins.jstreeEditDeactivate = function (options, parent) {\r\n\t\tthis.redraw_node = function(obj, deep, is_callback, force_render) {\r\n\t\t\tobj = parent.redraw_node.apply(this, arguments);\r\n\t\t\tif(obj) {\r\n\t\t\t\tvar i, j, tmp = null, icon = null;\r\n\t\t\t\tfor(i = 0, j = obj.childNodes.length; i < j; i++) {\r\n\t\t\t\t\t if(obj.childNodes[i] && obj.childNodes[i].className && obj.childNodes[i].className.indexOf(\"jstree-anchor\") !== -1) {\r\n\t\t\t\t\t \ttmp = obj.childNodes[i];\r\n\t\t\t\t\t \tbreak;\r\n\t\t\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\tif(tmp) {\r\n\t\t\t\t\ttmp.className += ' jstree-themeicon'; \r\n\t\t\t\t\ticon = _aEdit.cloneNode(false);\r\n\t\t\t\t\ttmp.insertBefore(icon, tmp.childNodes[12]);\r\n\t\t\t\t\tconsole.log($(icon).parent().html());\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn obj;\r\n\t\t};\r\n\t\t\r\n\t};\r\n\r\n\t// you can include the sample plugin in all instances by default\r\n\t//$.jstree.defaults.plugins.push(\"jstreeEditDeactivate\");\r\n})(jQuery);` \r\n\r\n```\r\n\r\n\r\nIt is only inserting just the ```<i>``` tag and not the parent ```<a>``` tag....\r\n\r\nconsole.log line is showing this......\r\n\r\n```<i class=\"jstree-icon jstree-themeicon\" role=\"presentation\"></i>Root node<i class=\"jstree-icon jstree-themeicon\"></i>```\r\n\r\nSo my question is ..is it not possible to add an element other that i or img or nested element in particular.....or is it just a syntax mistake by me?\r\n\r\nIf it is possible to add element tags  like ```<a>``` please provide an example if possible....\r\nThank you  \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/vakata/jstree/issues/comments/423103248","html_url":"https://github.com/vakata/jstree/issues/2115#issuecomment-423103248","issue_url":"https://api.github.com/repos/vakata/jstree/issues/2115","id":423103248,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzEwMzI0OA==","user":{"login":"Mudit-Garg","id":42021057,"node_id":"MDQ6VXNlcjQyMDIxMDU3","avatar_url":"https://avatars1.githubusercontent.com/u/42021057?v=4","gravatar_id":"","url":"https://api.github.com/users/Mudit-Garg","html_url":"https://github.com/Mudit-Garg","followers_url":"https://api.github.com/users/Mudit-Garg/followers","following_url":"https://api.github.com/users/Mudit-Garg/following{/other_user}","gists_url":"https://api.github.com/users/Mudit-Garg/gists{/gist_id}","starred_url":"https://api.github.com/users/Mudit-Garg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mudit-Garg/subscriptions","organizations_url":"https://api.github.com/users/Mudit-Garg/orgs","repos_url":"https://api.github.com/users/Mudit-Garg/repos","events_url":"https://api.github.com/users/Mudit-Garg/events{/privacy}","received_events_url":"https://api.github.com/users/Mudit-Garg/received_events","type":"User","site_admin":false},"created_at":"2018-09-20T09:04:28Z","updated_at":"2018-09-20T09:04:28Z","author_association":"NONE","body":"Thanks for letting me know about my silly mistake...duh..\r\nBut I tried with div and span already with same code ..still no luck...is there any other thing i'm missing?\r\n"}}
{"actor":{"display_login":"Mudit-Garg"}}