Tried using this for a site running Wysiwyg API using TinyMCE. The injected CSS did not display when the following option was selected.

Use theme CSS - loads stylesheets from current site theme.

I'm using Garland.

Comments

philbar’s picture

philbar’s picture

When I say "did not display", I mean in the TinyMCE editor. Since it is What You See Is What You Get, it should display all CSS elements.

After the changes are submitted, the CSS displays fine.

westbywest’s picture

Based on this blog:
http://crownedup.com/WYSIWYG_editor_image_support_IMCE_Wysiwyg-API_in_Dr...

I was able to get TinyMCE in Wysiwyg API v6.x-2.0-apha1 to load the injected CSS by specifying "Define CSS" in the Wysiwyg profile and then pointing it directly to the CSS injector file, i.e. %bsites/default/files/css_injector_1.css

To get the style to appear in the TinyMCE iframe itself, I had to specify relevant IDs and classes in CSS Injector, e.g.

body#tinymce.mceContentBody p span.customClass,
.customClass,
span.customClass
{
  color: #8B0000;
}

.. where customClass is defined in the CSS Classes field in this Wysiwyg profile.

The filename wildcard substitution mentioned in the blog did not work for me, however, meaning you can only point to one CSS Injector file, and that you can't include the theme CSS as well.