Blockly Editor
Adds a new document template based on Google Blockly |
Type | XAR |
Category | Application |
Developed by | |
Active Installs | 0 |
Rating | |
License | GNU Lesser General Public License 2.1 |
Bundled With | XWiki Standard |
Compatibility | 9.11.3 |
Table of contents
Description
This extension adds the Google Blockly Template to XWiki, to make programming easier for users who have little/no previous experience of programming, by allowing the creation of Blockly templated documents. Currently, this template provides support for combining the blocks from the default toolbox provided by Google, viewing the source code for the same, editing a document using these blocks and saving it.
Usage
To create a document using the Blockly template, please follow the steps given below:
- Make sure you're logged in
- Click on create page at the top right corner, and choose the "Blockly" template in the create page document.
Selecting Blockly editor to edit the page - This should take you to the Blockly template page. Drag and drop the blocks from the toolbox onto the adjacent div and combine them like puzzle pieces, as desired. For example:
For example:
Combining blocks appropriately - To delete any of the blocks, drag and drop the blocks into the bin.
- To view the source code for the blocks generated in the figure, click on the Source tab.
Source Code View - Save the code using either the "Save and View", or the "Save and Continue" buttons.
- If you want to view the code you generated and/or execute it, go to the View Page. It looks like this:
View Code - To run the code, click on "Run Code".
Running the blockly code - In case you want to edit the page, click on the edit button once again and all the Blockly blocks are loaded as they should be
Features
- A default toolbox containing tools for if-else conditions, loops, print statements, assignment, comparison statements etc.
The default Blockly toolbox - A bin for deleting unnecessary blocks, and features for creating duplicate blocks, adding comments etc by right-clicking on a block
Right clicking on Blockly blocks generates this menu - Converting this generated code into Javascript and running it as well
- Displaying the generated code in the textarea, wherein the code gets inserted at cursor position
- Saving the code to the page
(For screenshots and more information on how to use these features, please check the Usage section given above )
Future
Refer the Blockly design page for further details.
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.
You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:
- Log in the wiki with a user having Administration rights
- Go to the Administration page and select the Import category
- Follow the on-screen instructions to upload the downloaded XAR
- Click on the uploaded XAR and follow the instructions
- You'll also need to install all dependent Extensions that are not already installed in your wiki
Dependencies
Dependencies for this extension (org.xwiki.contrib:application-blockly-ui 0.6):
- org.xwiki.platform:xwiki-platform-webjars-api 9.11
- org.xwiki.contrib:blockly 0.1