I have just install TinyMCE editor for my website. But the default background is black and text colour is gray. Anybody can tell me how to change background to white and text colour to black.
To change the default font family, size, or color in the TinyMCE editor, we recommend using content_css or content_style (or a combination of both) depending on your use case. TinyMCE is shipped with a default CSS that determines what the font and everything else looks like in the editor itself.
Cloud based integration – Add the TinyMCE CDN link to your index. html or similar file, and set up a TinyMCE initialization script. Self-Hosted alongside your application – Download the TinyMCE zip file, and unzip the contents in your project directory. You can then include a local link to the rich text editor.
Or you can change the color using js:
tinyMCE.init(
mode : "textareas",
theme : "simple",
oninit : "postInitWork"
});
function postInitWork()
{
var editor = tinyMCE.getInstanceById('myEditorid');
editor.getBody().style.backgroundColor = "#FFFF66";
}
I strongly advise you to use the tinymce configuration to influence styles in tinymce, instead of fiddling with core css files.
There is the content_css setting which allows you to specify a ccs file which will overwrite the default behaviour (css). That's the way to go. You may use the css from the other answers provided.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With