Questions tagged [blockly]

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.

197 questions
3
votes
1 answer

How to make blockly horizontal

I want to make a block based program like scratchjr. I use blockly but I don't know how to change blocks shape/direction; I want to make blocks iconic and Horizontal, like this picture: The Question is: How to change blocks shape and direction?
user11955706
3
votes
1 answer

How to hide/remove field in Blockly?

How to hide a field based on the dropdown value change. I added a input field called 'A'. I have a drop-down field. If I select a value in the drop down, say 'Remove field A', then the input field should be removed. I tried removeField. But it did…
D J
  • 45
  • 1
  • 6
3
votes
1 answer

Read user entered input in blockly block

I have the below code in my blockly.js file Blockly.Blocks['account_number'] = { // Other type. init: function() { this.jsonInit({ "message0": "account_number %1", "args0": [{"type": "field_input", "name": "TYPE", "text": ""}], …
BigDataLearner
  • 1,388
  • 4
  • 19
  • 40
3
votes
3 answers

Importing module that uses getElementById in VueJS component

I am trying to import Blockly (via node-blockly from npm) into a VueJS component, but the javascript part of Blockly contains getElementById() calls, which causes an error as document.getElementById() is not available in VueJS. Any idea how to get…
Dirk Rejahl
  • 61
  • 1
  • 5
3
votes
1 answer

Blockly editor in C++ project

I'm working on a game where the player writes some basic AI that plays "instead of" him. So an algorithm written by the user must be executable right after he saves it. The game is written in C++ using Qt framework. I don't want to scare players…
Pyro2266
  • 310
  • 2
  • 5
  • 18
3
votes
3 answers

Is there another way to resize Blockly workspace?

I am trying to adapt my Blockly workspace inside a div. I want that if the page makes smaller, the div and the Blockly workspace inside of it would be smaller also. I know that there is a way that Google provides in its documentation but I think it…
Francisco Romero
  • 12,787
  • 22
  • 92
  • 167
3
votes
2 answers

Does Blockly have a file selector?

I am looking to use Blockly to allow non-techie users to specify test scripts. One part of it will require a File Selector, however, I can't see that Blockly has one. Does it? Actually, I can't find a complete list of standard blocks. Does anyone…
Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551
3
votes
2 answers

google blockly Jsinterpreter and interpreter step code

I am web developer and trying to developing maze game using Google Blockly. I am strucking here, i have Blocks when i am trying to run this blocks its working fine, but the problem is its not highlighting which function executing currently. Here is…
3
votes
0 answers

Is there a way to export Blockly Turtle graphics to SVG?

My children are having fun with Blockly, and I'd like to mill some of their drawings with my Shapeoko (a CNC mill). If I could export the Blockly rendering as SVG, I could then import it into any number of CAD/CAM packages. But there doesn't seem…
razeh
  • 2,725
  • 1
  • 20
  • 27
2
votes
1 answer

How to customize the look and feel of blockly blocks

I am trying to customize the look and feel of blocks provided by framework Blockly. Please see the link: Blockly Input Text But as I understood and researched, I can only modify the color of particular block. 'blockStyles': { 'my_block': { …
Ashish
  • 39
  • 1
2
votes
1 answer

Blockly doesn't show anything in the browser

I want to customize blockly but after following instructions from online sources, I don't see anything appearing in the browser. This is the example code:
Nyamkhuu Buyanjargal
  • 621
  • 2
  • 11
  • 29
2
votes
0 answers

Blockly commandeer code generation for following statements

How can I make a block that compiles to wrap all blocks that follow it? Here is an example of the block I want to make: I want to write generators that create the output: console.log('1'); console.log('2'); (function () { console.log('3'); …
theonlygusti
  • 11,032
  • 11
  • 64
  • 119
2
votes
1 answer

How do I get the total number of blocks in a Blockly workspace

If I have a Blockly workspace, how can I get the total number of blocks that are being used?
user12976477
  • 57
  • 1
  • 7
2
votes
2 answers

Google Blockly UI on jQuery Dialog is not editable

While rendering Blockly UI in jQuery Dialog, it does not allow to edit the inputs. Reason is Blockly adding a div to DOM with an input field like below:
saravanakumar
  • 1,747
  • 4
  • 20
  • 38
2
votes
1 answer

Custom Programming language in blockly?

How can i change the default block language from javascript to batch? I want to make a block creator that makes batch code .bat file, the default options are javascript, php, lua etc. how can i make a custom one?
user6388479
1
2
3
13 14