block_name generated_code
html<!DOCTYPE html> <html> </html>head<head> </head>title<title> </title>metacharset<meta charset="">metaviewport<meta name="viewport" content="width=device-width, initial-scale=1.0">
body<body> </body>header<header> </header>footer<footer> </footer>divider<div> </div>(name should bedivision)linebreak<br />hline<hr />
argsContains other attributes (name should beattrs)classclass=""idid=""alignalign=""(deprecated in HTML5, but still available in most browsers)emptyargattribute=""(where attribute is any user-entered attribute name - WARNING: this can be dangerous, for example JavaScript attributes. We don't recommend including this in a production toolbox)
emptytextInserts plain text in any appropriate containerspan<span> </span>textmod<strong/em/ins/etc> </>paragraph<p> </p>header<hX> </hX>(where X is 1-6)link<a href=""> </a>
table<table> </table>tablerow<tr> </tr>tableheading<th> </th>tabledata<td> </td>
unorderedlist<ul> </ul>orderedlist<ol> </ol>listitem<li> </li>
details<details> </details>summary<summary> </summary>
form<form> </form>input<input type="" value="" placeholder="" name="">label<label> </label>(forattribute TBA)button(TBA, use<input type="submit>for now)
image<img src="">(placeholderattribute TBA)audio<audio loop="" autoplay="" controls=""> <source src="" type=""> </audio>video<video loop="" autoplay="" controls=""> <source src="" type=""> </video>
For these snippets, the generated code is not shown since it's too long and relatively unimportant. However, XML toolbox examples may be provided.
chartGoogle Chart (Bar, Column or Pie)chart_rowA row of data for a Google Chartchart_columnA column to go inside a row for a Google Chart
XML toolbox example:
<block type="chart">
<value name="data">
<block type="chart_row">
<value name="columns">
<block type="chart_column"></block>
</value>
<value name="columns">
<block type="chart_column"></block>
</value>
</block>
</value>
<value name="modifier">
<block type="args">
<value name="content">
<block type="stylearg">
<value name="content">
<block type="widthheightnum">
<field name="option">height</field>
<field name="size">300px</field>
</block>
</value>
<value name="content">
<block type="widthheightnum">
<field name="option">width</field>
<field name="size">400px</field>
</block>
</value>
</block>
</value>
</block>
</value>
</block>
See https://github.com/cferdinandi/gumshoe.
scrollspyA block for creating a scrollspy system
See https://codedragon.org/editor/25d6617c5adb6470f9a2166d3a6d5f48 for an example of how to use this block
style<style> </style>(only fits inhead)styleargstyle=""(only fits inargs)linkhead<link rel="stylesheet" href="">(used to import Bootstrap, Materialize or Magic.css)cssitemselector {}
fontfamilyfont-family: ;fontsizefont-size: ;fontweightfont-weight: ;colorcolor: ;- deprecated; kept for backwards compatibilitycolor-newcolor: ;- new version ofcolor, accepting color type blocks instead of a built-in color pickercolordropdowncolor: initial/inherit;textshadowtext-shadow: a b c d;- deprecated; kept for backwards compatibilitytextshadow-newtext-shadow: a b c d;- new version oftextshadow, accepting color type blocks instead of a built-in color pickertexttransformtext-transform: ;textaligntext-align: ;letterspacingletter-spacing: ;
marginmargin-direction: ;(where direction is left, right, top or bottom)paddingpadding-direction: ;(same as margin)displaydisplay: ;overflowoverflow-direction: ;(where direction is y or x)widthheightnumwidth/height: ;(takes any input)widthheightwidth/height: ;(takes only auto, initial or inherit)floatfloat: ;verticalalignvertical-align: ;
color_picker#color- built-in Blockly color pickerhex_picker#color- manual hex text entryrgba_pickerrgba(r, g, b, a)bgcolorbackground-color: ;- deprecated; kept for backwards compatibilitybgcolor-newbackground-color: ;- new version ofbgcolor, accepting color type blocks instead of a built-in color pickerbgimagebackground-image: url();bgpositionbackground-position: ;bgrepeatbackground-repeat: ;bgsizebackground-size: ;cursorcursor: ;boxshadowbox-shadow: x y blur color;- deprecated; kept for backwards compatibilityboxshadow-newbox-shadow: x y blur color;- new version ofboxshadow, accepting color type blocks instead of a built-in color picker
borderborder: a b c;- deprecated; kept for backwards compatibilityborder-newborder: a b c;- new version ofborder, accepting color type blocks instead of a built-in color pickerborderedgeborder-edge: a b c;- deprecated; kept for backwards compatibilityborderedge-newborder-edge: a b c;- new version ofborderedge, accepting color type blocks instead of a built-in color pickerbordercolborder-collapse: ;borderradborder-radius: ;
transitiontransition-property: ; transition-duration: ; transition-delay: ; transition-timing-function: ;transitiontimingdropdownease/linear/etc...transitiontimingbeziercubic-bezier(0, 0, 0, 0)
cssevents::after/::before/:focus/:hover(name should becsspseudo)cssnot:not()