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.
Is there a way to add a separate class to two different TinyMCE instances on one page?
By default both get "mceContentBody" as the body class.
Can I set each instance to a different value so I can style them differently?
Comments
Comment #1
sunAs of now, no. TinyMCE is in control of that IFRAME and Wysiwyg module does not really munge it.
Comment #2
philbar CreditAttribution: philbar commentedCan we impletement this into TinyMCE's configuration page?
http://www.tinymce.com/wiki.php/Configuration:body_class
Comment #3
TwoDYou can set that using hook_wysiwyg_editor_settings_alter();
Maybe we'll put GUI controls for this setting in later, but it's currently a low priority. I would prefer to build a "custom setting" widget for that GUI first, so you could manually enter the name of the setting you want to change, give Wysiwyg the datatype and a value, and have that sent to the editor with the rest of the settings. That would allow for a much greater flexibility, and we would not have to change the GUI each time editors add or change settings.