Background image via inline style not accessible?
Strange .. i have explicitly to use specific class to access the background image (in my case it's class .bg) #desc-text-6 .bg will not work. Now, since .bg is a global style declaration, i need to make use of #desc-text-6 .bg Even adding a new class for my background only, again the editor makes it hard for the user...
Read full answer below ↓Question
This is very simple, but i can not access the background image set via CSS, within my custom block 'content'. How do i change the background image here? (even editor.getCss 'sees' the style) https://codepen.io/dimimet/pen/NWqYmbB
Cheers!
Answers (3)
Strange .. i have explicitly to use specific class to access the background image (in my case it's class .bg) #desc-text-6 .bg will not work. Now, since .bg is a global style declaration, i need to make use of #desc-text-6 .bg Even adding a new class for my background only, again the editor makes i...
Never mind.. reading half of the issues here, i saw that there is a little 'checkbox' next to the selected classes, which let me toggle the class view on/off. That way, i can add unique class now and assigned my bg-image to that ..then clicking on the lil checkbox, it will allow me to 'access' the...
Now, since .bg is a global style declaration, i need to make use of #desc-text-6 .bg
No, actually there are absolutely no good reasons to use a selector like this #desc-text-6 .bg, just create a single class for your element and point your CSS to it, no more checkbox to toggle...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2777
[QUESTION] How to update styles in Style Manager
Hello. I created custom component where I set backgraound-image via custom asset manager Custom block code: Command which I run to set new...
Issue #1255
[QUESTION]: How to set editor html contents from custom component?
I'm having trouble getting a custom block+component to display its template HTML inside the grapes editor. Within the exported HTML, the ma...
Issue #2079
Make Css style to not be returned
How to prevent the CSS of a block/component to be not returned when we used editor.getCss(); it's like https://grapesjs.com/docs/api/compon...
Issue #4922
Using !important code provided here breaks background image and gradient.
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Firefox Reproducible demo link https://jsf...
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 →Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.