Is there a way to prevent style property/trait edits in the sidebar from actually propagating to the component? #6353
-
Hello, I'm currently building a dynamic styling editor using grapesjs. The goal is for someone to be able to set styles/traits for an "initial" state for a given component, but then also support a "dynamic" state that lets someone set conditional styles/trait updates when a rule is selected The way i've done this so far is to have rules logic elsewhere and then a "rule selector". Then, i'm capturing updates to the styles/traits like so:
But as the above question marks indicate - how owuld I not just listen to, but actually sto these changes from propagating back to the main component styles? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can try intercepting addStyleTargets calls by hooking onto it |
Beta Was this translation helpful? Give feedback.
You can try intercepting addStyleTargets calls by hooking onto it