How to add the “Functions tab” to Google's blockly

According to the Demo that comes with blockly, we only have logic, loops, maths and text options when generation our code. here:

How do I add the functions and variables tab since the documentation provide seems quite shallow. Documentation:

Thanks in advance!



The "menu items" or "tabs" on the left of blockly demos make up the "Toolbox" In order to add more items on the tool box, check

For example, in the case of adding the Functions and Variables to the Toolbox, add the xml code below to your index.html.

<category name="Variables" custom="VARIABLE"></category>
<category name="Functions" custom="PROCEDURE"></category>

A little inspection of index.html will tell you where the xml code is compiled and you'll insert your code appropriately.


Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.