Editor: fix setting wpActiveEditor when TinyMCE is not used, see #21718

git-svn-id: http://core.svn.wordpress.org/trunk@22251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2012-10-16 22:01:30 +00:00
parent e6fe8c83a3
commit baeab0b474
1 changed files with 6 additions and 4 deletions

View File

@ -608,10 +608,12 @@ final class _WP_Editors {
try { tinymce.init(init); } catch(e){}
}
} else {
el = document.getElementsByClassName('wp-editor-wrap');
for ( i in el ) {
if ( typeof(el[i]) == 'object' )
el[i].onmousedown = function(){ wpActiveEditor = this.id.slice(3, -5); }
if ( tinyMCEPreInit.qtInit ) {
for ( i in tinyMCEPreInit.qtInit ) {
el = tinyMCEPreInit.qtInit[i].id;
if ( el )
document.getElementById('wp-'+el+'-wrap').onmousedown = function(){ wpActiveEditor = this.id.slice(3, -5); }
}
}
}