Issue #3506✓ SolvedOpened May 31, 2021by iabhiyaan5 reactions

Add click event on blocks

Quick answerby artf4

Well you can actually make use of custom render from blocks to apply custom DOM events.

Read full answer below ↓

Question

editor.on('block:click', (block) => {
  console.log(block)
})

Or Is there any way to listen for click event in block ?

Answers (3)

👍 Most helpfulartfJun 21, 2021

Well you can actually make use of custom render from blocks to apply custom DOM events.

GJSBlockMay 17, 2026

Thanks for reporting this, @iabhiyaan. Great question about FEAT: add click event on blocks. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for the on() event listener method Most operations can be ac...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.