Blockly is an open-source web-based, graphical programming environment that enables users to write JavaScript, Python, PHP, and Dart programs by moving around blocks. Developers can extend it to integrate with their own apps. It has been translated into over 40 (human) languages.
Questions tagged [blockly]
197 questions
11
votes
1 answer
Use Blockly inside a WPF WebBrowser
Is it possible to use the Blockly google javascript libraries inside a WPF WebBrowser?
In particular, Blockly needs several js scripts. How can we reference the js libraries?

oaimac
- 784
- 2
- 12
- 27
10
votes
2 answers
How can I make an instance of a block of Blockly with Javascript?
I have done the following block with Blockly in a customBlocks.js file:
Blockly.Blocks['move_right'] = {
init: function() {
this.appendValueInput("PIXELS")
.setCheck("Number")
.appendField("move to right");
…

Francisco Romero
- 12,787
- 22
- 92
- 167
7
votes
4 answers
How to generate blocks from code in blockly?
I have a blockly application which generates some output code. Now, is it possible to write some function which will take my output code and will put corresponding blocks on workspace.
For example, on this page,…

Suraj Narwade
- 207
- 2
- 6
6
votes
2 answers
Custom language generator to Blockly
I know that I can use
Blockly.JavaScript['my_code'] = function() { ... }
But how can I add another language support like JSON?
I tried ..
Blockly.Json['my_code'] = function() { ... }
It fails when I try to recover…

ridermansb
- 10,779
- 24
- 115
- 226
5
votes
2 answers
Unity and Google's Blockly library integration
For my undergrad final project I want to develop an educational game for teaching basic programming so I want to provide them some easy drag'n'drop visual programming editor like in this code it but i have no idea how to do this i'm new in unity and…

Gara
- 143
- 1
- 4
- 12
5
votes
5 answers
How do we import Blockly into an Angular 7 application?
I'm trying to use Blockly in an Angular 7 application but I'm unable to inject the Blockly editor.
I have downloaded the files from https://developers.google.com/blockly/guides/get-started/web and copied blockly_compressed.js into my src directory…

Craig
- 97
- 1
- 5
5
votes
1 answer
Generate a custom Blockly block from a user-provided string without eval
I am converting a string into a Google Blockly block using JavaScript.
The input string is something like "Hello %s World" - where %s defines a string input. I need to turn that into:
Blockly.Blocks['blockname'] = {
init: function() {
…

user2370460
- 7,470
- 10
- 31
- 46
4
votes
2 answers
How to read xml file(toolsbox.xml) in React typescript
I am unable to import xml file in tsx file, but in jsx file i can able to access that xml file

Sagar Raviprolu
- 102
- 1
- 7
4
votes
2 answers
What are the default blockly blocks?
The documentation shows use of some sample blocks, but I can't find a definitive list. I found a gist that is the type of list that I want, but it isn't official. The GitHub repository contains a set of json files that appear to implement the…

James Foster
- 2,070
- 10
- 15
4
votes
1 answer
Preventing the Blockly toolbox from being zoomed
When zooming in and out on the workspace the toolbox will also zoom which causes the blocks to increase/decrease in size.
Is there anyway to prevent zooming on the toolbox and its blocks, yet still allow for the workspace to be zoomed?

Iamprettybadatthis
- 53
- 4
4
votes
2 answers
Blockly on Node.js
I would like to run blockly on Node.js and make the code being executed directly on the server (block by block execution included), without needing to save the XML first and then running it in background; I have tried some modules present on npm but…

skarux
- 131
- 2
- 7
4
votes
3 answers
JS wait/pause in generated functions
What I am doing
I am in the middle of building a turtle graphics app using Blockly. The user can build a code from blocks, then the Blockly engine generates JS code, which draws to a canvas.
What my problem is
The Blockly engine generates the JS…

Nekomajin42
- 638
- 1
- 6
- 20
4
votes
6 answers
Is there a visual programming language with a large/configurable stage resolution?
My 8-year-old daughter is learning to program, and was excited to create projects using Code.org. Now she wants to design a program that creates a Babylonian number chart, with numbers from 1 to 1000, but there is no way to render such a thing with…

Emily Crutcher
- 638
- 5
- 10
4
votes
1 answer
How can you use the code generated by Blockly?
Google's Blockly seems to be an interesting tool to make educational software and games to help kids learn programming better.
Though google has a documentation for the same for developers but its very short and not of much help(for rookie…

Akshay
- 463
- 6
- 15
3
votes
1 answer
How to display Blockly in React
I tried to use blockly in my React project. The installation works fine, I can run my project without any error but blockly does not appear. I have a big empty block and I cannot figure out why. I kept the same components as the github project, I…

Thbwun
- 323
- 1
- 3
- 14