This problem has been bugging me for a while and none of the suggested solutions worked for me ... so I did a bit of digging and came up with a solution that does work for me.
I am using SilverStripe version 2.2.3 ... your version might be different so YMMV.
In the file
/jsparty/tiny_mce2/tiny_mce_src.js
at or around line# 3941 there is a line that looks like this ...
html = tinyMCE.getParam('doctype') + '<html><head xmlns="http://www.w3.org/1999/xhtml"><base href="' + tinyMCE.settings.base_href + '" /><title>blank_page</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body class="mceContentBody ' + extraClass + '" style="background-color:#FFFFFF";></body></html>';
This line has a hard-coded style attribute that sets the background to white.
According to my understanding of css, the style tag will override any external stylesheets ... not what I want.
So, when I removed the hard-coded style attribute from the line ... voila ... the background-color in my theme's editor.css file started working and I could use white text in the editor ... yay.
So in summary:
- remove the style= attribute so your new line looks like this ...
html = tinyMCE.getParam('doctype') + '<html><head xmlns="http://www.w3.org/1999/xhtml"><base href="' + tinyMCE.settings.base_href + '" /><title>blank_page</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body class="mceContentBody ' + extraClass + '";></body></html>';
And in [yourtheme]/css/editor.css add something like this ...
body.mceContentBody {
min-height: 200px;
font-size: 62.5%;
color: white;
background-color: black;
}
Save the changes and refresh your page (worked for me *without* using flush=1)
While having to hack the /jsparty files doesn't feel like the right solution in this case it worked for me.
cheers .. dave