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 ??
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, 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.
tinymce.init({
selector: 'textarea#editor',
directionality :"rtl"
});