Issue #4937💬 AnsweredOpened February 20, 2023by besart-k1 reactions

Block:custom is not working on React

Quick answerby artf1

@besart-k you have to provide a reproducible demo as if it works with the current Vue demo example it shouldn't be different in React. Maybe you're using an old version of grapesjs or doing something wrong in your React app, so in this case the reproducible demo is mandatory. I'm closing this one as the demo itself us...

Read full answer below ↓

Question

GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome Version 110.0.5481.100 (Official Build) (arm64)Reproducible demo link NoneDescribe the bug I am trying to replicate in React the customizing the Block Manager like in this example Vue block manager, but the "block:custom" callback is not called. How to reproduce the bug? Put this on init configuration blockManager: { blocks: blocks, custom: true }, Put this on inside useEffect useEffect(()=>{ editor.on('block:custom', (props)=>{console.log(props)}) },[]) What is the expected behavior? props n...

Answers (2)

artfFebruary 23, 2023

@besart-k you have to provide a reproducible demo as if it works with the current Vue demo example it shouldn't be different in React. Maybe you're using an old version of grapesjs or doing something wrong in your React app, so in this case the reproducible demo is mandatory. I'm closing this one a...

GJSBlockMay 17, 2026

Thanks for reporting this, @besart-k. Great question about block:custom is not working on React. 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 b...

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.