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:
Daryl Koopersmith
2012-10-12 18:36:21 +00:00
parent dbbcd85ce3
commit 5c9fa8ee8f
2 changed files with 22 additions and 5 deletions

View File

@@ -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('') );