TinyMCE: fix toolbars alignment in RTL.

Fixes #37760 for trunk.
Built from https://develop.svn.wordpress.org/trunk@38349


git-svn-id: http://core.svn.wordpress.org/trunk@38290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz
2016-08-25 01:20:30 +00:00
parent 2cc42e5dbb
commit 15edc78f6f
7 changed files with 31 additions and 12 deletions

View 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' );