Hi
When you start blockly, it runs through this piece of code:
workspace = Blockly.inject('blocklyDiv',
{comments: true,
collapse: true,
disable: true,
grid:
{spacing: 25,
length: 3,
colour: '#ccc',
snap: true},
horizontalLayout: side == 'top' || side == 'bottom',
maxBlocks: Infinity,
media: '../media/',
oneBasedIndex: true,
readOnly: false,
rtl: rtl,
scrollbars: true,
toolbox: toolbox,
toolboxPosition: side == 'top' || side == 'start' ? 'start' : 'end',
zoom:
{controls: true,
wheel: true,
startScale: 1.0,
maxScale: 4,
minScale: .25,
scaleSpeed: 1.1}
});
There is a readOnly field somewhere in the middle.
I would like to make it true when I press a button.
Is this possible?
Thanks,
Walter