Changes for page Blockly Editor
Last modified by Admin on 2022/02/21 00:26
Change comment:
There is no comment for this version
Summary
-
Objects (1 modified, 0 added, 0 removed)
Details
- ExtensionCode.ExtensionClass[0]
-
- Description
-
... ... @@ -29,16 +29,54 @@ 29 29 //The code executed// 30 30 1. 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 :) 31 31 32 -== Features ==32 +== Categories == 33 33 34 +=== Default Categories === 34 34 35 -* A toolbox containing the default categories for loops, logic statements, variables, macros, math, text etc and the customly added categories for XWiki Script bindings and XWQL queries. 36 +The [[blockly documentation>>https://github.com/google/blockly/wiki]] contains the documentation for the default categories such as logic (if-else), loops, variables, text, colour, lists etc 37 + 38 +=== Custom Categories === 39 + 40 +==== Queries ==== 41 + 42 +{{image reference="Queries.png" |alt="The XWQL Queries category" width="150" height="395"}}{{/image}} 43 +This category contains the following blocks: 44 + 45 +===== Execute Block ===== 46 + 47 +* Takes the query string/variable as input 48 +* Outputs $services.query.xwql(query).execute() 49 + 50 +===== Not Block ===== 51 + 52 +* The NOT operator is used to negate the predicate that follows it. 53 + 54 +===== Distinct Block ===== 55 + 56 +* Returns only distinct, not duplicate, results 57 +* Takes an object attribute as input 58 + 59 +===== Get Object Property Block ===== 60 + 61 +* Returns the properties/attributes of an object 62 +* The first input field takes the object as input, and the second input field is a text input which takes the attribute name as input. 63 +* For example, to get attribute ##space.name##, we do: 64 +{{image reference="GetAttrib.png" |alt="Block to get Attribute of Object" width="350" height="91"}}{{/image}} 65 + 66 +===== Get XObject Block ===== 67 + 68 +* Returns the specified XObject in the current document 69 +* The input is the XWiki Class Name (for example to get get the XObject of class ##XWiki.XWikiUsers##, the inputs in the two text fields will be XWiki and XWikiUsers. The code output for this example would be ##doc.object(XWiki.XWikiUsers)## 70 + 71 +== Features == 72 + 73 +* A toolbox containing the default categories for loops, logic statements, variables, macros, math, text etc and the customly added categories for XWiki Script bindings and XWQL queries. (Check Categories section given above for more detail) 36 36 {{image reference="BlocklyToolbox.png" |alt="The default Blockly toolbox" width="150" height="553"}}{{/image}} 37 37 //The Blockly toolbox// 38 38 * A bin for deleting unnecessary blocks, and features for creating duplicate blocks, adding comments etc by right-clicking on a block 39 -{{image reference="Right HandBlocklyMenu.png" ||alt="Right hand menu" width="650" height="669"}}{{/image}}77 +{{image reference="RightClickBlocklyMenu.png" ||alt="Right hand menu" width="650" height="488"}}{{/image}} 40 40 //Right clicking on Blockly blocks generates this menu// 41 -* Converting this generated code into Javascript and running it as well79 +* Converting this generated code into Velocity and running it as well 42 42 * Displaying the generated code in the textarea, wherein the code gets inserted at cursor position 43 43 * Saving the code to the page 44 44