blockly > CodeGenerator > workspaceToCode
CodeGenerator.workspaceToCode() method
Generate code for all blocks in the workspace to the specified language.
Signature:
workspaceToCode(workspace?: Workspace): string;
Parameters
Parameter | Type | Description |
---|---|---|
workspace | Workspace | (Optional) Workspace to generate code from. |
Returns:
string
Generated code.