I install Tinymce editor to my site. And now i need to set the default direction to RTL not LTR.

I try this way but not work with me :-

#tinymce p {
 direction : rtl;

How can do that ??

  • In WordPress, if you enable a RTL language, TinyMCE directionaly setting is atuomatically set to RTL. What are trying to do exactly? – cybmeta Feb 18 '15 at 17:47
  • where can set this setting – Kotsh GFX Feb 18 '15 at 17:52
  • "I install Tinymce editor to my site" - are you actually using WordPress? – vancoder Feb 18 '15 at 18:53
  • yes i use WordPress – Kotsh GFX Feb 19 '15 at 9:45
  • 3 years later, RTL editing still a PITA. I thought Wordpress was a good choice. I thought a decade-old global platform would have ironed out such issues. I thought wrong. – Rolf May 11 '18 at 4:15

In wordpress, the editor will support and will be in RTL by default if you install it in an rtl language, for example, if you install wordpress with the hebrew UI the editor will be rtl by default.

The problem is if you install the hebrew UI but change your profile to use the English one, in order to still use the editor in rtl mode while using the English UI you can add this code to functions.php or a site plugin:

function Eyal_setEditorToRTL($settings)
    $settings['directionality'] = 'rtl';
    return $settings;
add_filter('tiny_mce_before_init', 'Eyal_setEditorToRTL');

The filter alters the default settings for the tinyMCE editor and set it in rtl mode.

        selector: 'textarea#editor', 
        directionality :"rtl"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.