Setting backgroud image results in duplicate style rules
Question
Hi @artf, I have one strange little problem. I have a custom trait which has an implementation for setting images and background images. When I set the background image a second time by using the code below I'm getting duplicated styling rules on the element Id. I already played around a bit with the forceClass and avoidInlineStyle but it doesn't really help with this problem. Maybe related to this problem: The element also has a class with a default background image. When I open the StyleManager I only see that background image in there. Not the images from the Id style rules. Looks like it...
Answers (2)
Duplicate of #932
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #932
Setting background image results in duplicate style rules
Hi @artf, I have one strange little problem. I have a custom trait which has an implementation for setting images and background images. Wh...
Issue #582
background image issue
Hi @artf one more issue when using custom manager , what do we set on background images? editor.getSelected().set('src', url) not working o...
Issue #1258
Style is not copying after cloning the element after Save
Hi @artf. At the first time before saving the template, When I make one element and clone it, the style is coming in the clonned element. T...
Issue #771
Image src is not updating
Hi @artf, I have updated the image src using below code: editor.getSelected().set('attributes', {'src': image_Url}); but when i set all the...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins β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.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.