I was trying to create a blockly workspace using JSON files. The xml version works file since I am using Blockly.Xml.textToDom(xmlString). But I couldn't find anything on the docs to define a toolbox using JSON. There are some references as to how to make the JSON file but I couldn't inject it into the workspace. Here's the code I have, thanks!
MyBlockly.workspace = Blockly.inject('blocklyDiv',
{
media: 'elevator-blockly/media/',
toolbox: FunctionHere(jsonString),
scrollbars: true,
zoom:
{
controls: true,
wheel: false,
startScale: 0.8,
maxScale: 3,
minScale: 0.5,
scaleSpeed: 1.2,
pinch: false
},
renderer: 'zelos',
trashcan: true
}
);