Issue #4376πŸ’¬ AnsweredOpened June 13, 2022by iamqinglong0 reactions

Unselected custom component will also listen to event 'styleable:change'

Quick answerby artf

Hi @iamqinglong this is the expected behavior as you're creating a listener on the editor model, but you can check the selected component in this way

Read full answer below ↓

Question

GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? chrome 100 Reproducible demo link https://grapesjs.com/demo.html Describe the bug How to reproduce the bug?Drop two or more custom component <img width="1230" alt="Screen Shot 2022-06-10 at 3 11 54 PM" src="https://user-images.githubusercontent.com/48402616/173286267-09325ccd-6475-4b81-84ca-790a3f1b168b.png">Restyle either of the componentThe other unselected component will also listen to 'styleable:change' event <img width="1438" alt="Screen Shot 2022-06-10 at 3 10 29 PM" src="https://user-images...

Answers (2)

artfβ€’ June 17, 2022

Hi @iamqinglong this is the expected behavior as you're creating a listener on the editor model, but you can check the selected component in this way

GJSBlockβ€’ May 17, 2026

Thanks for reporting this, @iamqinglong. Great question about Unselected custom component will also listen to event 'styleable:change'. The recommended approach with StyleManager is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for the on()...

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.