Widgets: Replace `wp.editor` references in the legacy text widget.
This changes the references to `wp.editor` in the text widget’s JavaScript to `wp.oldEditor`, which is the new location for the old `editor` script that was previously available at `window.wp.editor`. Follow up to [51387-51388,51390]. Props spacedmonkey, zieladam. Fixes #53437. Built from https://develop.svn.wordpress.org/trunk@51409 git-svn-id: http://core.svn.wordpress.org/trunk@51020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a3a7ccf107
commit
b60650f5bd
|
@ -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
|
||||
},
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.9-alpha-51408';
|
||||
$wp_version = '5.9-alpha-51409';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue