Editor: look at the class of the wrapper element instead of `getUserSetting('editor')` to determine the default editor, fixes #27257
Built from https://develop.svn.wordpress.org/trunk@27364 git-svn-id: http://core.svn.wordpress.org/trunk@27214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cbe89d6710
commit
ce7191d2f9
|
@ -797,8 +797,7 @@ final class _WP_Editors {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
( function() {
|
( function() {
|
||||||
var init, edId, qtId, firstInit, override,
|
var init, edId, qtId, firstInit, wrapper;
|
||||||
loadMCE = typeof getUserSetting !== 'undefined' ? getUserSetting( 'editor' ) === 'tinymce' : true;
|
|
||||||
|
|
||||||
if ( typeof tinymce !== 'undefined' ) {
|
if ( typeof tinymce !== 'undefined' ) {
|
||||||
for ( edId in tinyMCEPreInit.mceInit ) {
|
for ( edId in tinyMCEPreInit.mceInit ) {
|
||||||
|
@ -808,10 +807,11 @@ final class _WP_Editors {
|
||||||
init = firstInit = tinyMCEPreInit.mceInit[edId];
|
init = firstInit = tinyMCEPreInit.mceInit[edId];
|
||||||
}
|
}
|
||||||
|
|
||||||
override = tinymce.DOM.hasClass( tinymce.DOM.select( '#wp-' + edId + '-wrap' )[0], 'tmce-active' );
|
wrapper = tinymce.DOM.select( '#wp-' + edId + '-wrap' )[0];
|
||||||
override = override || ! tinyMCEPreInit.qtInit.hasOwnProperty( edId );
|
|
||||||
|
if ( ( tinymce.DOM.hasClass( wrapper, 'tmce-active' ) || ! tinyMCEPreInit.qtInit.hasOwnProperty( edId ) ) &&
|
||||||
|
! init.wp_skip_init ) {
|
||||||
|
|
||||||
if ( ( loadMCE || override ) && ! init.wp_skip_init ) {
|
|
||||||
try {
|
try {
|
||||||
tinymce.init( init );
|
tinymce.init( init );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue