By jim_at_miramontes on
I've added TinyMCE to a site, and it all seems to be working EXCEPT that the text in a TinyMCE textarea is, by default, center justified; I want it to be left-justified by default. I presume that somebody is slipping a "text-align: center" past me, but I can't find it. If I disable TinyMCE, the text in the textareas is properly left-justified, so my theme and page style seem ok. I've tried hanging "text-align: left" off various parts of the page, trying to reset what's happening in the text area, but without success. Any suggestions?
Comments
Found it, not without a bit
Found it, not without a bit of effort. The trick is that the TinyMCE textarea exists in an iframe, which has its own set of stylesheets. The only stylesheets that are loaded into this iframe are (a) a basic stylesheet from down in the TinyMCE code and (b) your theme's stylesheet, which the Drupal module knows to load. Thus, you need to add something like the following to your theme's stylesheet:
since the body block in the iframe has the id "tinymce".
Arggh.
Thanks for posting this tip.
Thanks for posting this tip. I'm using 960 Robots and each time I migrate the site I always forget where the CSS is supposed to go. Originally I modified the TinyMCE CSS files, but your solution is much better.
Cheers!