How to integrate https://github.com/google/blockly

0
0

Hi again!

I integrated JS particles library visual effect (my first integration) so basically Wisej.Web.Widget integration is OK on my site.

But I have a problem with Blockly integration – .InitScript. Why what works in HTML page do not works for Wisej.Web.Widget . Is Wisej.Web.Widget like web page browser wiever or it is something differnt.

Here is my InitScript and it dont works, please help:

this.init = function() {

this.container.id = “widget1″;
<xml id=”toolbox” style=”display: none”>
<block type=”controls_if”></block>
<block type=”controls_repeat_ext”></block>
<block type=”logic_compare”></block>
<block type=”math_number”></block>
<block type=”math_arithmetic”></block>
<block type=”text”></block>
<block type=”text_print”></block>
</xml>

var workspace = Blockly.inject(‘widget1’,{toolbox: document.getElementById(‘toolbox’)});
}

 

 

  • You must to post comments
0
0

Use Wisej.Web.Widget to load the libraries and put the same code you would put in a plain javascript app in the InitScript property of the Wisej.Web.Widget. There are several examples here: https://github.com/iceteagroup/wisej-examples.

If you upload a functional javascript application that uses the widget we can include it in a wisej sample.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.