I try to add style sheet but fail . There ia any way to add css into TinyTinyMCE.

Comments

Steve Lockwood’s picture

You can refer to an existing stylesheet in TinyMCE's init parameters - this will put some of the classes in your style sheet into TinyMCE's drop-down list.

BUT this has to be a stylesheet that is already in your configuration - ie a Drupal standard stylesheet or one linked to your theme.

Drupal does not seem to have a way of adding stylesheets unless they come with a module or a theme. What you could do is modify one of the existing stylesheets, perhaps linked to your theme. (I also wrote a theme called Flexible 2, which does allow you to add stylesheets, maybe this would help)

OneTwoTait’s picture

I see the install instructions give an example... but how do I know which stylesheet to use? And should it include the "?Y" after ...".css"?

In my source I see the ones listed below as well as a whole bunch from modules.

..."/modules/system/defaults.css?Y" />
..."/modules/system/system.css?Y" />
..."/modules/system/system-menus.css?Y" />
..."/modules/user/user.css?Y" />
Steve Lockwood’s picture

Rather than alter one of the system stylesheets - I would suggest altering a theme stylesheet if you can identify one.

The ?Y after the stylesheet is a trick used to make your browser reload the stylesheet - you don't need to include this when you change the tinytinymce init script.