(auto-resize-workspace div)
Call this after define-workspace
to enable automatic resizing
Call this after `define-workspace` to enable automatic resizing
(compact-1 ids? block-xml)
Turns raw Block XML into compact form
Turns raw Block XML into compact form
(define-blocks blockdefs)
Define new block types. Blockdefs is a seq of maps that are converted to JSON as per https://developers.google.com/blockly/guides/configure/web/custom-blocks
Define new block types. Blockdefs is a seq of maps that are converted to JSON as per https://developers.google.com/blockly/guides/configure/web/custom-blocks
(define-workspace div toolbox-xml options change-handler)
Initialize Blockly. Args:
div: Name of the HTML div element in which to inject Blockly
toolbox-xml: XML in EDN format. Usually generated by toolbox
.
options: map of additional options to inject
, eg: {:zoom true}
. See https://developers.google.com/blockly/guides/get-started/web#configuration
change-handler: a fn of one argument (event) that gets called on any changes to the workspace.
Initialize Blockly. Args: div: Name of the HTML div element in which to inject Blockly toolbox-xml: XML in EDN format. Usually generated by `toolbox`. options: map of additional options to `inject`, eg: `{:zoom true}`. See https://developers.google.com/blockly/guides/get-started/web#configuration change-handler: a fn of one argument (event) that gets called on any changes to the workspace.
(get-block block-id)
Returns the block js object
Returns the block js object
(get-block-field-value block-id field-name)
Get the value of a block field
Get the value of a block field
(set-block-field-value block-id field-name value)
Set the value of a block field
Set the value of a block field
Translate a toolbox definition form into EDNified XML
Translate a toolbox definition form into EDNified XML
(update-toolbox toolbox-def)
Update the toolbox, keeping workspace the same (warning: dangerous)
Update the toolbox, keeping workspace the same (warning: dangerous)
(workspace-selected-xml)
Returns the XML of the selected block group, or the upper left one if none is selected
Returns the XML of the selected block group, or the upper left one if none is selected
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close