diff --git a/src/js/_enqueues/wp/widgets/text.js b/src/js/_enqueues/wp/widgets/text.js index c2deeefa96..ee4dbb9529 100644 --- a/src/js/_enqueues/wp/widgets/text.js +++ b/src/js/_enqueues/wp/widgets/text.js @@ -161,7 +161,7 @@ wp.textWidgets = ( function( $ ) { control.fields.text.val( syncInput.val() ); } } else if ( control.editor && ! control.editorFocused && syncInput.val() !== control.fields.text.val() ) { - control.editor.setContent( wp.editor.autop( syncInput.val() ) ); + control.editor.setContent( wp.oldEditor.autop( syncInput.val() ) ); } }, @@ -237,7 +237,7 @@ wp.textWidgets = ( function( $ ) { // The user has disabled TinyMCE. if ( typeof window.tinymce === 'undefined' ) { - wp.editor.initialize( id, { + wp.oldEditor.initialize( id, { quicktags: true, mediaButtons: true }); @@ -248,7 +248,7 @@ wp.textWidgets = ( function( $ ) { // Destroy any existing editor so that it can be re-initialized after a widget-updated event. if ( tinymce.get( id ) ) { restoreTextMode = tinymce.get( id ).isHidden(); - wp.editor.remove( id ); + wp.oldEditor.remove( id ); } // Add or enable the `wpview` plugin. @@ -262,7 +262,7 @@ wp.textWidgets = ( function( $ ) { } } ); - wp.editor.initialize( id, { + wp.oldEditor.initialize( id, { tinymce: { wpautop: true },