TinyMCE: add lang attribute

This is needed to make `hyphens: auto;` work correctly.

Fixes #32555.


git-svn-id: https://develop.svn.wordpress.org/trunk@35217 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ella Iseulde Van Dorpe 2015-10-16 10:10:32 +00:00
parent 093b6b5d11
commit 4abf64eb14
2 changed files with 3 additions and 0 deletions

View File

@ -543,6 +543,7 @@ final class _WP_Editors {
'wpeditimage_disable_captions' => $no_captions,
'wpeditimage_html5_captions' => current_theme_supports( 'html5', 'caption' ),
'plugins' => implode( ',', $plugins ),
'wp_lang_attr' => get_bloginfo( 'language' )
);
if ( ! empty( $mce_external_plugins ) ) {

View File

@ -428,6 +428,8 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
dom.setAttrib( doc.documentElement, 'dir', 'rtl' );
}
dom.setAttrib( doc.documentElement, 'lang', editor.getParam( 'wp_lang_attr' ) );
if ( env.ie ) {
if ( parseInt( env.ie, 10 ) === 9 ) {
bodyClass.push('ie9');