diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js
index 206acf6..8ca5d40 100644
a
|
b
|
|
1470 | 1470 | deferred.resolve(); |
1471 | 1471 | |
1472 | 1472 | if ( state !== frame.state() || url !== state.props.get('url') ) { |
1473 | | return; |
| 1473 | // this has to be removed to make the auto preview work |
| 1474 | //return; |
1474 | 1475 | } |
1475 | 1476 | |
1476 | 1477 | state.set({ |
… |
… |
|
2135 | 2136 | this.on( 'router:render:browse', this.browseRouter, this ); |
2136 | 2137 | this.on( 'content:create:browse', this.browseContent, this ); |
2137 | 2138 | this.on( 'content:render:upload', this.uploadContent, this ); |
| 2139 | this.on( 'content:create:fromURL', this.createFromURLContent, this ); |
2138 | 2140 | this.on( 'toolbar:create:select', this.createSelectToolbar, this ); |
2139 | 2141 | }, |
2140 | 2142 | |
… |
… |
|
2152 | 2154 | browse: { |
2153 | 2155 | text: l10n.mediaLibraryTitle, |
2154 | 2156 | priority: 40 |
| 2157 | }, |
| 2158 | fromURL: { |
| 2159 | text: 'From URL', |
| 2160 | priority: 50 |
2155 | 2161 | } |
2156 | 2162 | }); |
2157 | 2163 | }, |
… |
… |
|
2195 | 2201 | }) ); |
2196 | 2202 | }, |
2197 | 2203 | |
| 2204 | createFromURLContent: function() { |
| 2205 | var view = new media.view.Embed({ |
| 2206 | controller: this, |
| 2207 | model: this.state('embed') |
| 2208 | }).render(); |
| 2209 | |
| 2210 | this.content.set( view ); |
| 2211 | view.url.focus(); |
| 2212 | }, |
| 2213 | |
2198 | 2214 | /** |
2199 | 2215 | * Toolbars |
2200 | 2216 | * |