views:

377

answers:

1

I've implemented the YUI Editor and would like to apply a CSS to change the look of the text the user is working on inside the rich text editor.

I'm working with the yui_editor plugin for ruby on rails, but that doesn't mean that a generic answer wouldn't be welcome. It's even OK if you could just point me to the correct API section and/or an example on how to do this.

Thanks a lot!

+2  A: 

In the meantime, I've found the answer myself: This is possible by using the css Configuration Attribute (YUI API).

To implement this with the yui_editor plugin on rails, I had to insert the css-attribute as seen on the following code snippet in config/yui_editor.yml:

editor_config_javascript: "
{
  handleSubmit: true,
  autoHeight: false,
  css: 'YADA { FOO: BAR; }',
  collapse: true,
  toolbar: ...
}

That's it, works like a charm.

Javier