wysiwyg_get_css() ignores RTL css when invoking drupal_add_css().

This can be reproduced if you have chose the "Use theme CSS" as the "Editor CSS". And you have a -rtl.css file in your theme, this is when the editor ignores the -rtl.css files.

Patch is attached in comment #1

Members fund testing for the Drupal project. Drupal Association Learn more


Mohammed J. Razem’s picture

Status: Active » Needs review
493 bytes
TwoD’s picture

Hmm, Locale module switches to the RTL stylesheets based on the current Drupal language, but we don't currently use that elsewhere, so we'd also need to fix #532794: Use current user's language together with this for the rest of the editor to actually reflect being used in RTL mode.

Mohammed J. Razem’s picture

Well this patch only adds drupal_alter('css') which happend to be used by Locale module to inject -rtl.css styles.
This means that this will allow any other modules implementing hook_css_alter() to reflect their changes to WYSIWYG if it was theme related CSS.

Maybe the title of the issue is a bit specific for Locale's case, but this indeed will help other modules achieve their purpose in WYSIWYG.

mgifford’s picture

Issue summary: View changes
Status: Needs review » Needs work
Parent issue: » #2343445: Stable release of Wysiwyg module, v7.x-2.4 please
Mohammed J. Razem’s picture

Status: Needs work » Needs review

Can you please be more specific of what makes it "Needs work"?
See #3 for what the patch does.

mgifford’s picture

I just tried to apply the patch to branch 7.x-2.x and it failed. I think it just needs a re-roll against the latest dev version.

TwoD’s picture

Status: Needs review » Closed (duplicate)

Please try the patch in #2289683: Select in-editor theme and get all stylesheets. It should get all the stylesheets from the selected theme, including RTL ones if applicable.
Post follow-ups in there.