how to add a new class to the editor's iframe body?
Question
hi, Is that possible to add a new css class to the body of editor's iframe ??
Answers (3)
@ryzraz what do you mean an existing class ? Even thought, setStyle can replace properties of existing classes by overwrite each classes as you like..
example:::
editor.setStyle(`
.gjs-toolbar {
background-color: #595e61; /* replace the background color of toolbar */
}
`);
Hi @ryzraz you can use setStyle as below
editor.setStyle(`
.your-selector {
color: white;
background: red;
}
`);
hi @ploutos27, its an existing class .. i wanted here to add that class to the body of iframe..!
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1982
[QUESTIONS] addcomponent after the selected component
how do I make it possible to add new components after the component I selected, at this time I use editor.DomComponents.addComponent (block...
Issue #1683
How to change id/class when new element drop on editor or render element with dynamic ip?
Hello @artf , Hope you are doing well. I have two questions regards dynamic blocks adding, 1) Is it possible to render the block with dynam...
Issue #1088
add new custom default class for map
can you please let me know how to add custom class in parent div of map iframe. when I try to add custom class in move function of 'grapesj...
Issue #1265
how to use php functions inside of editor iframe ???
Hi @artf, currently i am working on php,wordpress and grapesjs.What I wanted here is.., how can I add the php functions inside the iframe o...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.