Changeset 28273
- Timestamp:
- 05/06/2014 04:50:52 AM (11 years ago)
- Location:
- branches/3.9
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.9
- Property svn:mergeinfo changed
/trunk merged: 28169,28183
- Property svn:mergeinfo changed
-
branches/3.9/src/wp-includes/css/media-views.css
r28101 r28273 1782 1782 } 1783 1783 1784 .media-embed .setting input.hidden { 1784 .media-embed .setting input.hidden, 1785 .media-embed .setting textarea.hidden { 1785 1786 display: none; 1786 1787 } -
branches/3.9/src/wp-includes/js/mce-view.js
r28272 r28273 484 484 */ 485 485 getHtml: function() { 486 var attrs = _.defaults( 487 this.shortcode.attrs.named, 488 wp.media[ this.shortcode.tag ].defaults 489 ); 490 return this.template({ model: attrs }); 486 var attrs = this.shortcode.attrs.named; 487 attrs.content = this.shortcode.content; 488 489 return this.template({ model: _.defaults( 490 attrs, 491 wp.media[ this.shortcode.tag ].defaults ) 492 }); 491 493 }, 492 494 -
branches/3.9/src/wp-includes/js/tinymce/plugins/wpview/plugin.js
r28084 r28273 333 333 // Empty the wrap node 334 334 if ( 'textContent' in node ) { 335 node.textContent = ' ';335 node.textContent = '\u00a0'; 336 336 } else { 337 node.innerText = ''; 338 } 339 340 // This makes all views into block tags (as we use <div>). 341 // Can use 'PostProcess' and a regex instead. 342 dom.replace( dom.create( 'p', null, window.decodeURIComponent( dom.getAttrib( node, 'data-wpview-text' ) ) ), node ); 337 node.innerText = '\u00a0'; 338 } 343 339 }); 344 340 }); 341 342 editor.on( 'PostProcess', function( event ) { 343 if ( event.content ) { 344 event.content = event.content.replace( /<div [^>]*?data-wpview-text="([^"]*)"[^>]*>[\s\S]*?<\/div>/g, function( match, shortcode ) { 345 if ( shortcode ) { 346 return '<p>' + window.decodeURIComponent( shortcode ) + '</p>'; 347 } 348 return ''; // If error, remove the view wrapper 349 }); 350 } 351 }); 345 352 346 353 editor.on( 'keydown', function( event ) {
Note: See TracChangeset
for help on using the changeset viewer.