Closed tacman closed 2 years ago
jstree 3 has a module definition (I believe the term was UMD) - that was way before ES6 and standard modules. It can be require
d but not as a standard module. And v3 always lives inside jQuery - so jQuery.jstree
. I hope this answers the question - if not - please clarify.
I found this while searching:
let $el = jQuery.jstree.reference(el);
where el is a DOM element, not a jquery selector. It didn't work, but it makes me think there's something like it.
For now, I'm just instantiating the tree with
let $el = $(el);
this.$element.jstree();
Any status update on the version that doesn't require jquery?
is there a way to import or require jstree, and then instantiate it on a dom element?
That is, something like
I imagine this will be more standardized in version 4, without jQuery, but maybe there's a way to do this now. Thanks.