Fix for arabic RTL text alignment in WYSIWYG editor
-
So this plugin incorrectly aligns the text for arabic when you are in the admin. I could override most of this with an admin theme except for the WYSIWYG editors. That was fixed by finding the following to qtranslkate_javascript.php around line 333:
$q_config['js']['qtrans_switch'] = " switchEditors.go = function(id, lang) { id = id || 'content'; lang = lang || 'toggle';
Then add:
// fix for arabic if(lang == 'ar'){ jQuery('#qtrans_textarea_content').css({'direction': 'rtl'}); }
Hopefully this helps someone, maybe it will make it into a revision of the plugin…
Also the admin theme styles i added were:
input[data-language="ar"]{ direction: rtl !important; } textarea[data-language="ar"]{ direction: rtl !important; }
You will need to create your own plugin to load those in the admin, you cannot just add that to styles.css, see theming admin wordpress article.
- The topic ‘Fix for arabic RTL text alignment in WYSIWYG editor’ is closed to new replies.