vakata/jstree

Non-functional plugins ?

Closed this issue · 1 comments

Hi,
I just tested this plugin which is excellent but I have a small problem.
In the following example i activate two plugins: dnd and contextmenu.
After reloading the page it does not work and i have no errors displayed.
Did I make a mistake? Here is my file:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <style>
    html { margin:0; padding:0; font-size:62.5%; }
    body { max-width:800px; min-width:300px; margin:0 auto; padding:20px 10px; font-size:14px; font-size:1.4em; }
    h1 { font-size:1.8em; }
    .demo { overflow:auto; border:1px solid silver; min-height:100px; }
    </style>
    <link rel="stylesheet" href="dist/themes/default/style.min.css" />
</head>
<body>
    <div id="test" class="demo"></div>
    <script src="jquery-3.1.1.min.js"></script>
    <script src="dist/jstree.min.js"></script>
    
    <script>
    $('#test').jstree({
        'core' : {
            "check_callback" : true,
            "plugins" : [ "dnd", "contextmenu" ],
            'data' : [
                {
                    "text" : "Root node",
                    "state" : { "opened" : false },
                    "children" : [
                        {
                            "text" : "Child node 1",
                        },
                        {
                            "text" : "Child node 2",
                            "state" : { "disabled" : false },
                        }
                    ]
                }
            ]
        }
    });
    </script>
</body>
</html>

The error comes from me, the option "plugins" is in the wrong place...