Interactive · Gutenberg

Drawing Canvas block for WordPress

A fully interactive freehand drawing canvas with multiple tools, undo, and download — right in your page.

Get Blockenberg

Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.

Get Blockenberg

What it actually does

A fully interactive freehand drawing canvas with multiple tools, undo, and download — right in your page.

Inspector panels on this block: Block Content, Canvas Settings, Toolbar & UI. Those titles come from index.js, not from a shared template.

Behavior controls: “Default tool” options: ✏️ Pen (freehand), 🖊️ Marker (soft), 📏 Line, □ Rectangle, ○ Ellipse.

Where to find it

Gutenberg inserter → Interactive → search “Drawing Canvas” (block name `blockenberg/drawing-canvas` in block.json). Style it in the sidebar after insert.

How to use Drawing Canvas block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Drawing Canvas”, insert it. Category: Interactive.
  3. Configure inspector controls that exist on this block. Open Block Content. Set “Canvas width (px)”, “Canvas height (px)”, “Default stroke width”, “Default tool”.
  4. Check the published page. The view script reads HTML data attributes: data-opts. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
Canvas width (px)Numeric range control in the inspector. Range 300–1600. block.json default: 800. Saved as `canvasWidth`.
Canvas height (px)Numeric range control in the inspector. Range 200–1200. block.json default: 480. Saved as `canvasHeight`.
Default stroke widthNumeric range control in the inspector. Range 1–40. block.json default: 4. Saved as `defaultLineWidth`.
Default toolSelect control; the chosen value is saved on the block. Options: ✏️ Pen (freehand); 🖊️ Marker (soft); 📏 Line; □ Rectangle; ○ Ellipse; 🧹 Eraser. block.json default: pen. Saved as `defaultTool`.
Show background gridOn/off toggle in the inspector. Off by default. Saved as `showGrid`.
Show toolbarOn/off toggle in the inspector. On by default. Saved as `showToolbar`.
Show undo buttonOn/off toggle in the inspector. On by default. Saved as `showUndo`.
Show download buttonOn/off toggle in the inspector. On by default. Saved as `showDownload`.
Typography — TitleShared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoTitle`.
SubtitleShared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoSubtitle`.
Accent colorColor control in the inspector. block.json default: #6366f1. Saved as `accentColor`.
Canvas backgroundColor control in the inspector. block.json default: #ffffff. Saved as `backgroundColor`.
Grid linesColor control in the inspector. block.json default: #e5e7eb. Saved as `gridColor`.
Section backgroundColor control in the inspector. block.json default: #f8fafc. Saved as `sectionBg`.
Title colorColor control in the inspector. block.json default: #1e1b4b. Saved as `titleColor`.

What the front-end script actually does

When this is the right block

Notes from the implementation

viewScript: this folder’s frontend.js is enqueued on the front end for this block.

FAQ

How do I add the Drawing Canvas block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Drawing Canvas”. It sits under Interactive. After insert, open Block Content and set “Canvas width (px)”, “Canvas height (px)”, “Default stroke width”, “Default tool”.

What makes Drawing Canvas different from other Blockenberg blocks?

A fully interactive freehand drawing canvas with multiple tools, undo, and download — right in your page. Inspector labels on this block include “Canvas width (px)”, “Canvas height (px)”, “Default stroke width”, “Default tool”.

Is the Drawing Canvas Gutenberg block free?

Yes. Drawing Canvas ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Drawing Canvas to match my theme?

Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Block Content, Canvas Settings, Toolbar & UI).

Related interactive blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Drawing Canvas from the Gutenberg inserter.

Get Blockenberg