Properly align MCE attachment views.
* Adds a `$wrapper` property to MCE views to allow them to manipulate the wrapper on render. This should be used sparingly — only for layout changes that cannot be accomplished through altering the wrapper's children — and likely only for adding/removing classes. * Uses `wp.html.string()` in `wp.mce.view.toView()`. see #21390, #21812, #21813. git-svn-id: http://core.svn.wordpress.org/trunk@22220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -111,7 +111,7 @@ var tb_position;
|
||||
workflow.on( 'update:insert', function( selection ) {
|
||||
this.insert( selection.map( function( attachment ) {
|
||||
if ( 'image' === attachment.get('type') )
|
||||
return '\n' + wp.media.string.image( attachment ) + '\n';
|
||||
return wp.media.string.image( attachment ) + ' ';
|
||||
else
|
||||
return wp.media.string.link( attachment ) + ' ';
|
||||
}).join('') );
|
||||
|
||||
Reference in New Issue
Block a user