Get your own copy
Don't hesitate! Just download and test it all by yourself for free!
This option enables you to specify a custom CSS file that extends the theme content CSS. This CSS file is the one used within the editor (the editable area). This option can also be a comma separated list of URLs.
If you specify a relative path, it is resolved in relation to the URL of the (HTML) file that includes TinyMCE, NOT relative to TinyMCE itself.
Absolute path:
// File: http://domain.mine/mysite/index.html
tinyMCE.init({
...
content_css : "/mycontent.css" // resolved to http://domain.mine/mycontent.css
});
Relative path:
// File: http://domain.mine/mysite/index.html
tinyMCE.init({
...
content_css : "mycontent.css" // resolved to http://domain.mine/mysite/mycontent.css
});
Using multiple stylesheets:
tinyMCE.init({
...
content_css : "mycontent.css,mycontent2.css" // includes both css files in header
});
Browser caching might cause TinyMCE to not read the contents of a changed CSS file. You'll see "old" colors & styles.
One solution is to manually clear the browser cache when the file for content_css or editor_css has changed. Another solution is to use an old hack which adds a bogus parameter to the URL containing a present timestamp like "myFile.css?bogus=10023561235". Possible solutions could look like this:
content_css : "path/myfile.css?" + new Date().getTime(),
content_css : "path/myscript.php?myParam=myValue&bogus=" + new Date().getTime(),
The CSS file in this setting should be the very CSS file that controls the looks (or "layout") of all your pages! So, let's say you include a file "myLayout.css" in all your pages in order to control your site's global looks then this file must be set as your content_css option, because then the contents in the editor will also have the looks of your site.
jarroyo
I'm sorry, I meant the "style_formats" modifier.
Anyway, I think TinyMCE is on its way to be the best WYSIWYG editor... Sadly, at the moment it's still "on its way".
jarroyo
This is great, but TinyMCE does not load the classes defined in styles. These ommited classes may be created by using "custom_formats"... but this overrides what has been previously loaded from the CSS!! This makes neccessary tot redefine all the CSS rules for H1, H2, etc both at the CSS file and at the "custom_formats" modifier.