mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 06:29:30 +00:00
TinyMCE: remove the empty paragraph that sometimes is left over after adding an image caption.
Fixes #32003. Built from https://develop.svn.wordpress.org/trunk@32141 git-svn-id: http://core.svn.wordpress.org/trunk@32121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9891900a82
commit
6c5dec8886
@ -452,15 +452,15 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
|
||||
|
||||
if ( parent = dom.getParent( node, 'p' ) ) {
|
||||
parent.parentNode.insertBefore( wrap, parent );
|
||||
|
||||
if ( dom.isEmpty( parent ) ) {
|
||||
dom.remove( parent );
|
||||
}
|
||||
} else {
|
||||
node.parentNode.insertBefore( wrap, node );
|
||||
}
|
||||
|
||||
editor.$( wrap ).find( 'dt.wp-caption-dt' ).append( node );
|
||||
|
||||
if ( parent && dom.isEmpty( parent ) ) {
|
||||
dom.remove( parent );
|
||||
}
|
||||
}
|
||||
} else if ( captionNode ) {
|
||||
// Remove the caption wrapper and place the image in new paragraph
|
||||
@ -734,15 +734,15 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
|
||||
|
||||
if ( parent = dom.getParent( node, 'p' ) ) {
|
||||
parent.parentNode.insertBefore( wrap, parent );
|
||||
|
||||
if ( dom.isEmpty( parent ) ) {
|
||||
dom.remove( parent );
|
||||
}
|
||||
} else {
|
||||
node.parentNode.insertBefore( wrap, node );
|
||||
}
|
||||
|
||||
editor.$( wrap ).find( 'dt.wp-caption-dt' ).append( node );
|
||||
|
||||
if ( parent && dom.isEmpty( parent ) ) {
|
||||
dom.remove( parent );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ( wrap ) {
|
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-RC1-32140';
|
||||
$wp_version = '4.2-RC1-32141';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user