TinyMCE: fix external references in wpview and wpemoji plugins in the Classic Block instance when running from /build.

Fixes #46147.

git-svn-id: https://develop.svn.wordpress.org/trunk@44718 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2019-01-30 14:11:01 +00:00
parent 0612ea2d38
commit 1f809d9ff1
2 changed files with 9 additions and 4 deletions

View File

@ -1,6 +1,8 @@
( function( tinymce, wp, settings ) {
( function( tinymce ) {
tinymce.PluginManager.add( 'wpemoji', function( editor ) {
var typing,
wp = window.wp,
settings = window._wpemojiSettings,
env = tinymce.Env,
ua = window.navigator.userAgent,
isWin = ua.indexOf( 'Windows' ) > -1,
@ -125,4 +127,4 @@
}
} );
} );
} )( window.tinymce, window.wp, window._wpemojiSettings );
} )( window.tinymce );

View File

@ -1,10 +1,13 @@
/**
* WordPress View plugin.
*/
( function( tinymce, wp ) {
( function( tinymce ) {
tinymce.PluginManager.add( 'wpview', function( editor ) {
function noop () {}
// Set this here as wp-tinymce.js may be loaded too early.
var wp = window.wp;
if ( ! wp || ! wp.mce || ! wp.mce.views ) {
return {
getView: noop
@ -199,4 +202,4 @@
getView: noop
};
} );
} )( window.tinymce, window.wp );
} )( window.tinymce );