From 31fa66e976ab548a308e57f871d30d43496304c2 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Sat, 24 Jun 2017 09:18:21 +0000 Subject: [PATCH] TinyMCE: fix directionality settings for RTL languages. Props westonruter, sa3idho. Fixes #40972 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@40927 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-editor.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wp-includes/class-wp-editor.php b/src/wp-includes/class-wp-editor.php index 73de84de2b..da39c96de1 100644 --- a/src/wp-includes/class-wp-editor.php +++ b/src/wp-includes/class-wp-editor.php @@ -826,6 +826,10 @@ final class _WP_Editors { $settings['indent'] = true; $settings['elementpath'] = false; + if ( is_rtl() ) { + $settings['directionality'] = 'rtl'; + } + // In production all plugins are loaded (they are in wp-editor.js.gz) // but only these will be initialized by default. $settings['plugins'] = implode( ',', array(