]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/class-wp-editor.php
WordPress 4.6.2
[autoinstalls/wordpress.git] / wp-includes / class-wp-editor.php
index f0290b0f1bccb3183d8c9146ae4e8338282bba50..f7137f83ed805d4095d6b640918dd68165ce8388 100644 (file)
@@ -1259,6 +1259,14 @@ final class _WP_Editors {
                        var init, id, $wrap;
 
                        if ( typeof tinymce !== 'undefined' ) {
+                               // Fix RTL
+                               tinymce.on( 'addeditor', function( event ) {
+                                       event.editor.rtl = event.editor.settings.rtl_ui ||
+                                               ( event.editor.editorManager &&
+                                               event.editor.editorManager.i18n &&
+                                               event.editor.editorManager.i18n.rtl );
+                               }, true );
+
                                for ( id in tinyMCEPreInit.mceInit ) {
                                        init = tinyMCEPreInit.mceInit[id];
                                        $wrap = tinymce.$( '#wp-' + id + '-wrap' );