BlocksMedia & Design
Canvas
Programmatically draw graphics, shapes, and text onto an image canvas.
Canvas Block
The Canvas Block allows you to dynamically generate or edit images using drawing commands, similar to the HTML5 Canvas API.
Configuration
| Field | Required | Description |
|---|---|---|
| Width | ✅ | The width of the canvas in pixels. |
| Height | ✅ | The height of the canvas in pixels. |
| Drawing Commands | ✅ | A JSON array or script detailing the shapes, text, colors, and coordinates to draw. |
Output Variable
Specify a Variable Name to store the resulting image.
The variable will directly contain the Base64 string of the generated image.
Error Handling
NO_DESIGN— Triggered when drawing commands are missing or empty.RENDER_FAILED— Triggered if rendering the canvas fails.FETCH_FAILED— Triggered if an image URL in the drawing commands cannot be fetched.
