Questions tagged [google-blockly]

Google Blockly is a JavaScript library for building visual programming editors. It adds an editor to your app that represents coding concepts as interlocking blocks. It outputs syntactically correct code in the programming language of your choice. It is an open-source project developed and maintained by the google team. Use this tag for questions regarding the implementation of this library or extending the functionality of this library.

Google's Blockly is a web-based, visual programming editor. Users can drag blocks together to build programs. All code is free and open source.

The Blockly library adds an editor to your app that represents coding concepts as interlocking blocks. It outputs syntactically correct code in the programming language of your choice. Custom blocks may be created to connect to your own application.

Blockly is being used by hundreds of projects, most of them educational: Blockly Games, App Inventor, Microsoft MakeCode, Ozo Blockly, micro bit, etc.

Important links

Standard lockup

enter image description here

72 questions
0
votes
0 answers

Blockly.Xml.textToDom expected an document

I have been trying to restore all my used blocks from localStorage.I am looping through all the local saved blocks but I got the following error. It would be great if I can get some help. Error: blockly_compressed.js:1274 Uncaught Error:…
Sakhawat Hossain
  • 454
  • 8
  • 23
0
votes
1 answer

Cypress test runner not rendering Blockly categories

I have a React web app which uses Blockly that I'm currently trying to write automated tests for using the Cypress framework. Cypress works pretty well for the basic process of signing on, but starts behaving inconsistently once Blockly is supposed…
0
votes
1 answer

Prevent a new block from being attached to the same type if the target is used as a StatementInput

I basically have two types of blocks: a rule block and a fact block (just like in Prolog). They can both be attached to each other. The rule block expects two inputs of the type 'fact'. However, it should not be possible to have multiple attached…
NickWood
  • 1
  • 2
0
votes
1 answer

Blockly how to prevent concatenated blocks from splitting

In my toolbox.xml I have created a custom block by concatenating multiple blocks, something like
Emanuel
  • 1,333
  • 1
  • 10
  • 11
0
votes
1 answer

Append the user given text into block

I am searching for a method from blockly which will take the user input text given from a modal popup into the block. Can you help me with this. thanks
0
votes
1 answer

Adding API call to JS-interpreter for use with custom blockly block

I want to preface this by saying I'm new to JavaScript, blockly and most certainly the use of Neil Fraser JS-interpreter. I've made some custom blocks that simply create JavaScript that when eval() put an object of its block type and user inputs…
0
votes
1 answer

I can't get Blockly working in Angular : How to make it work?

I would like import Blockly in Angular 7, I've import some Blockly files in my angular.json : "scripts": [ "node_modules/blockly/blockly_uncompressed.js", "node_modules/blockly/blocks_compressed.js", …
0
votes
2 answers

Blockly - build.py not producing consistent results on different computers

I'm working on a Blockly project. I just changed computers. When I run build.py on my new computer to compress the files, it produces a version of blocks_compressed.js that does not work. When I try to use it, none of my blocks display, because it…
Trevor Shaw
  • 123
  • 1
  • 10
0
votes
1 answer

Blockly: How to obtain value of a Dropdown or Checkbox Block

I´m new to Blockly and can not find a way to obtain field value of a dropdown or checkbox. Lets consider following scenario (generated with blockly-dev-tools): Blockly.Blocks['feature'] = { init: function () { this.appendDummyInput() …
Macilias
  • 3,279
  • 2
  • 31
  • 43
0
votes
2 answers

Use variable from callback as global variable

I made a block in which the request to the specified URL occurs. Inside this block, I can work with the data from response, but outside this block I can not get this data because of asynchrony. Is it possible to simulate a synchronous request in…
0
votes
1 answer

Why I'm unable to use mouse to drag and drop and even click in C# browser

I want to use Google blockly in my C# Window Form. I'm using inbuilt Webbrowser in my application. Here is Code : namespace WbView { public partial class Form1 : Form { public Form1() { …
Sunny Bhadana
  • 241
  • 3
  • 14
-1
votes
1 answer

How can we create a treeview toolbox in blockly as in image any sample code or need guide to the docs

In the image left is toolbox,when we select the option in tool box it opens a flyout in workspace as in the right can't understand the procedure in docs need help to integrate it using html javascript
1 2 3 4
5