Issue #1342Opened August 6, 2018by ryzraz1 reactions

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)

ploutos27August 7, 20181 reactions

@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 */
     }   
`);
ploutos27August 6, 20180 reactions

Hi @ryzraz you can use setStyle as below

editor.setStyle(` 
   .your-selector {
       color: white;
       background: red;
   }
`);
ryzrazAugust 6, 20180 reactions

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.