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.
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
Comment | File | Size | Author |
---|---|---|---|
#1 | WYSIWYG_ignores_RTL_CSS-1926584-1.patch | 493 bytes | Mohammed J. Razem |
Comments
Comment #1
Mohammed J. RazemComment #2
TwoDHmm, 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.
Comment #3
Mohammed J. RazemWell 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.
Comment #4
mgiffordComment #5
Mohammed J. RazemCan you please be more specific of what makes it "Needs work"?
See #3 for what the patch does.
Comment #6
mgiffordI 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.
Comment #7
TwoDPlease 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.