We have a Drupal 7.1.8 install with WYSIWYG and TinyMCE installed.

Our client would like to be able to create Basic Pages at will.
We would like our client to use the CSS rules we have established for site uniformity.
It seems that this should be possible with the TinyMCE Styles option. This seems like it should be able to pick up styles from style sheets. In fact, the CSS area in configuration seems to indicate that. But there isn't enough documentation on how to reference the style sheets specifically.

Comments

twod’s picture

Yes, TinyMCE will scan the stylesheets passed via its content_css option to see if it finds any styles it can use for the dropdown. By default, Wysiwyg will put the current/admin theme's stylesheet(s) into this option, which may or may not produce a usable list of styles for the dropdown, depending on how the styling is done.

You can override which files get loaded into the editing-area by changing the "Editor CSS" option under the "CSS" section to "Define CSS". Then put the path to a stylesheet into the "CSS path" field below it. TinyMCE will then only add the basic content styling from its theme (background colors, font sizes, TinyMCE-specific elements, etc), and styles required by plugins, to your own styles from that stylesheet.

The TinyMCE devs did realize there may be a need to limit the styling to a subset of the styling actually used in those stylesheets, so they added the theme_advanced_styles setting to directly override the dropdown list and skip scanning the stylesheets. In Wysiwyg we've tied that setting to the "CSS classes" textarea at the bottom of the profile configuration form.
In there, you can put a simple list of class names to put on elements along with a more user friendly name to actually show in the dropdown.

I hope that helps a bit.

twod’s picture

Issue summary: View changes
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.