mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
RTL for TinyMCE:
- Add _dir: 'rtl' to the TinyMCE translation object. - Fix editor.css for RTL. - Fix the Edit and Delete buttons position for wpview and images. - For _mce_set_direction(), update documentation and fix adding the 'ltr' button. Fixes #27773 git-svn-id: https://develop.svn.wordpress.org/trunk@28094 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -279,6 +279,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
||||
|
||||
if ( editor.getParam( 'directionality' ) === 'rtl' ) {
|
||||
bodyClass.push('rtl');
|
||||
dom.setAttrib( doc.documentElement, 'dir', 'rtl' );
|
||||
}
|
||||
|
||||
if ( env.ie ) {
|
||||
|
||||
@@ -403,7 +403,7 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
|
||||
}
|
||||
|
||||
function addToolbar( node ) {
|
||||
var rectangle, toolbarHtml, toolbar, toolbarSize,
|
||||
var rectangle, toolbarHtml, toolbar, left,
|
||||
dom = editor.dom;
|
||||
|
||||
removeToolbar();
|
||||
@@ -425,12 +425,16 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
|
||||
'contenteditable': false
|
||||
}, toolbarHtml );
|
||||
|
||||
editor.getBody().appendChild( toolbar );
|
||||
toolbarSize = dom.getSize( toolbar );
|
||||
if ( editor.rtl ) {
|
||||
left = rectangle.x + rectangle.w - 82;
|
||||
} else {
|
||||
left = rectangle.x;
|
||||
}
|
||||
|
||||
editor.getBody().appendChild( toolbar );
|
||||
dom.setStyles( toolbar, {
|
||||
top: rectangle.y,
|
||||
left: rectangle.x
|
||||
left: left
|
||||
});
|
||||
|
||||
toolbarActive = true;
|
||||
|
||||
Reference in New Issue
Block a user