library(jsTreeR)
dnd <- list(
always_copy = TRUE
)
nodes <- list(
list(
text = "RootA",
type = "root",
children = list(
list(
text = "ChildA1",
type = "child"
),
list(
text = "ChildA2",
type = "child"
)
)
),
list(
text = "RootB",
type = "root",
children = list(
list(
text = "ChildB1",
type = "child"
),
list(
text = "ChildB2",
type = "child"
)
)
)
)
types <- list(
root = list(
icon = "glyphicon glyphicon-ok"
),
child = list(
icon = "glyphicon glyphicon-file"
)
)
jstree(
nodes,
dragAndDrop = TRUE, dnd = dnd,
types = types
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.