You are not logged in.
Pages: 1
I'm wondering if there is a good way to specify a content_css file for the TinyMCE editor. I had previously edited core > admin > js > main.js, and passed the following argument into the tinyMCE.init() function:
content_css : "/css/master.css?" + new Date().getTime()
Obviously, changing core files is not ideal. Is there a better way to do this that doesn't require modifying core files? I just updated, and am going through the motions of re-implementing these changes, but I figured I would check for a better solution first so I don't have to do this again in the future. Thanks.
Offline
One of those secret things that I often forget exist:
Create a Setting with the ID of "tinymce-content-css" and set it to the full URL of your content CSS.
We often also just override /core/admin/layouts/_html-field-loader.php (add a file at /custom/admin/layouts/_html-field-loader.php) to do things with TinyMCE like allowing extra tags or attributes. If you want to add in a cache buster like Date.getTime() you'll need to do it in the custom override, but you could always just manually bust the cache by editing the setting whenever you update the content CSS.
Offline
Gotta love secrets like that! The cache buster isn't super necessary. I'm not editing the CSS as much now that the site is live; that was more for development. Thanks.
Offline
Pages: 1