Customizing the Web IDE

Posted on
  • I've downloaded the source for the web IDE and I would like to customize a few things. Specifically, I'm writing new Blockly blocks, so I would like to be able to:

    1. Default to Blockly view as opposed to JavaScript
    2. Have the blockly portion take up most or all of the screen by default.
    3. I've added my new blocks to new list items like "Variables" or "Espruino". Is it possible to
      (a) get rid of these lists all together and just show all of the blocks available?, or
      (b) display only a subset of the list, then do something in the IDE to reveal more list items? The idea is to have a teacher "unlock" new blocks as a student passes a level with a subset of blocks.

    Thanks,
    Rehman

  • Hi,

    1. The easiest thing would be just to call Espruino.Core.Code.switchToBlockly(). If you want to make your code extensible, you could write a 'plugin' in js/plugins, add it to main.html, and then have it call that function on initialisation.

    2. The divider uses 'splitster' - you'll have to look at splitster.js to see what you have to do, but you can probably just change the arguments to the line $(".split-pane").splitster({ in js/core/app.js

    3. You'd have to ask on the Blockly forum about this... Personally I'd consider grouping them by 'level', and then you could presumably hide the label for that level if the children weren't supposed to see it.

  • Thanks Gordon :)

    Rehman

  • Just a clarification, where would you call Espruino.Core.Code.switchToBlockly() from?

    Also, the code in js/core/app.js has a TODO that you plan to load the splitster orientation from file. Just wondering if that has been implemented already.

    Thanks.

  • Copy plugins/_examplePlugin.js to a new file, add a link to it to main.html near where all the other plugins are mentioned and just call Espruino.Core.Code.switchToBlockly() from init().

    And no, the splitster state isn't loaded from a file yet - I guess that's something Matt put in. It'd be quite nice to be able to load/save it (and the blockly/code state) to the existing config system...

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Customizing the Web IDE

Posted by Avatar for rsm @rsm

Actions