Set wpActiveEditor as soon as any editor associated button is clicked, including Add Media, switching Text to Visual, etc. Fixes #26747.
git-svn-id: https://develop.svn.wordpress.org/trunk@26881 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c37a101100
commit
6409324446
|
@ -811,8 +811,21 @@ final class _WP_Editors {
|
|||
}
|
||||
}
|
||||
}
|
||||
}());
|
||||
|
||||
if ( typeof jQuery !== 'undefined' ) {
|
||||
jQuery('.wp-editor-wrap').on( 'click.wp-editor', function() {
|
||||
if ( this.id ) {
|
||||
window.wpActiveEditor = this.id.slice( 3, -5 );
|
||||
}
|
||||
});
|
||||
} else {
|
||||
for ( qtId in tinyMCEPreInit.qtInit ) {
|
||||
document.getElementById( 'wp-' + qtId + '-wrap' ).onclick = function() {
|
||||
window.wpActiveEditor = this.id.slice( 3, -5 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}());
|
||||
</script>
|
||||
<?php
|
||||
|
||||
|
|
Loading…
Reference in New Issue