GrapesJS / style-bg

Full-stack background style property type for GrapesJS, with the possibility to add images, colors, and gradients
MIT License
33 stars 18 forks source link

Issue: Layer not created for existing CSS #2

Closed yanosuke closed 1 year ago

yanosuke commented 4 years ago

Hey Artf, as always, you've done an incredible job with GrapesJS and I was very pleasantly surprised to notice this plugin in the demo. There is but one issue I have found so far. The plugin won't create a background layer for existing background information within the CSS. There are three ways I currently know of to replicate this event.

1) I have noticed the background color property under Typography has been removed in the demo, however, this is a good place to test it. If you were to apply a background color through these properties, the plugin will not create a layer in its background property.

2) If a template (that was created before this plugin was added) is loaded in GrapesJS, any backgrounds that were set are unable to be edited as no background layer for them exists.

3) Finally, if a background layer is added and set, and you were to click the Import on the Import Template modal, the layer is also removed.

Likely, this is the result of this layer information not being present in the components or style objects created by GrapesJS, however, would it be possible to have this layer be created automatically if any of those 3 situations occur?

Thank you very much for all you have done.

MarksEliel commented 3 years ago

+1 - any updates?

rvrolijk commented 3 years ago

Not to my knowledge yet. I may have to add this to the GrapesJS github instead of it being isolated here

artf commented 1 year ago

I published a new release of the plugin to support the new Style Manager API and from this demo you should be able to see how the editor loads initial HTML/CSS and all the background styles are properly shown