I’m trying to make a plugin that will put a text into visual_logic.js as is.
this.appendValueInput('TEXT')
.setCheck('String')
.appendField('exec Script');
var text = Blockly.JavaScript.valueToCode(block, 'TEXT', Blockly.JavaScript.ORDER_NONE);
return '${text}\n';
this code returns the following
('console.log(\'Hello, Verge!\');' + '\n' +
'console.log(\'Hello, Verge!\');' + '\n' +
'console.log(\'Hello, Verge!\');')
but I need to get this
console.log('Hello, Verge!');
console.log('Hello, Verge!');
console.log('Hello, Verge!');
Is there a way to read ValueInput field as it was written in the text puzzle without using text.replace
?
Puzzles and JS. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of meaning at all.