diff --git a/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js b/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js
index fd6de50fc0..fc39aba6b9 100644
--- a/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js
+++ b/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js
@@ -587,231 +587,6 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
dom.addClass( editor.getBody(), captionClass );
- // Add caption field to the default image dialog
- editor.on( 'wpLoadImageForm', function( event ) {
- if ( editor.getParam( 'wpeditimage_disable_captions' ) ) {
- return;
- }
-
- var captionField = {
- type: 'textbox',
- flex: 1,
- name: 'wpcaption',
- minHeight: 60,
- multiline: true,
- scroll: true,
- label: 'Image caption'
- };
-
- event.data.splice( event.data.length - 1, 0, captionField );
- });
-
- // Fix caption parent width for images added from URL
- editor.on( 'wpNewImageRefresh', function( event ) {
- var parent, captionWidth;
-
- if ( parent = dom.getParent( event.node, 'dl.wp-caption' ) ) {
- if ( ! parent.style.width ) {
- captionWidth = parseInt( event.node.clientWidth, 10 ) + 10;
- captionWidth = captionWidth ? captionWidth + 'px' : '50%';
- dom.setStyle( parent, 'width', captionWidth );
- }
- }
- });
-
- editor.on( 'wpImageFormSubmit', function( event ) {
- var data = event.imgData.data,
- imgNode = event.imgData.node,
- caption = event.imgData.wpcaption,
- captionId = '',
- captionAlign = '',
- captionWidth = '',
- imgId = null,
- wrap, parent, node, html;
-
- // Temp image id so we can find the node later
- data.id = '__wp-temp-img-id';
- // Cancel the original callback
- event.imgData.cancel = true;
-
- if ( ! data.style ) {
- data.style = null;
- }
-
- if ( ! data.src ) {
- // Delete the image and the caption
- if ( imgNode ) {
- if ( wrap = dom.getParent( imgNode, 'div.mceTemp' ) ) {
- dom.remove( wrap );
- } else if ( imgNode.parentNode.nodeName === 'A' ) {
- dom.remove( imgNode.parentNode );
- } else {
- dom.remove( imgNode );
- }
-
- editor.nodeChanged();
- }
- return;
- }
-
- if ( caption ) {
- caption = caption.replace( /\r\n|\r/g, '\n' ).replace( /<\/?[a-zA-Z0-9]+( [^<>]+)?>/g, function( a ) {
- // No line breaks inside HTML tags
- return a.replace( /[\r\n\t]+/, ' ' );
- });
-
- // Convert remaining line breaks to
- caption = caption.replace( /(
]*>)\s*\n\s*/g, '$1' ).replace( /\s*\n\s*/g, '
' );
- caption = verifyHTML( caption );
- }
-
- if ( ! imgNode ) {
- // New image inserted
- html = dom.createHTML( 'img', data );
-
- if ( caption ) {
- node = editor.selection.getNode();
-
- if ( data.width ) {
- captionWidth = parseInt( data.width, 10 );
-
- if ( ! editor.getParam( 'wpeditimage_html5_captions' ) ) {
- captionWidth += 10;
- }
-
- captionWidth = ' style="width: ' + captionWidth + 'px"';
- }
-
- html = '
/, '' ).replace( /<\/p>$/, '' ); - } - } - }); - // Prevent IE11 from making dl.wp-caption resizable if ( tinymce.Env.ie && tinymce.Env.ie > 10 ) { // The 'mscontrolselect' event is supported only in IE11+