Ticket #23198: 23198.3.diff
File 23198.3.diff, 760 bytes (added by , 11 years ago) |
---|
-
wp-admin/js/post-formats.js
12 12 $this.addClass('nav-tab-active').blur(); 13 13 $('#post_format').val(format); 14 14 $('#post-body-content').attr('class', 'wp-format-' + format ); 15 16 if ( typeof(tinymce) !== 'undefined' ) { 17 var ed = tinymce.get( 'content' ), edBody, pformat; 18 if ( ed && this.id ) { 19 edBody = ed.getBody(); 20 pformat = 'post-format-' + this.id; // also need to handle 'post-format-0' 21 edBody.className = edBody.className.replace( /\bpost-format-[^ ]+/, '' ); 22 ed.dom.addClass( edBody, format ); 23 } 24 } 25 15 26 }); 16 27 17 28 // Image selection