Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
philbar CreditAttribution: philbar commentedWysiwyg API Issue: #395802: Incompatible with CSS Injector Module
Comment #2
philbar CreditAttribution: philbar commentedWhen 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.
Comment #3
westbywest CreditAttribution: westbywest commentedBased 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.
.. 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.