Ticket #7177: insert-image.patch
| File insert-image.patch, 1.9 KB (added by , 18 years ago) |
|---|
-
wp-admin/includes/media.php
65 65 function media_send_to_editor($html) { 66 66 ?> 67 67 <script type="text/javascript"> 68 <!-- 69 top.send_to_editor('<?php echo addslashes($html); ?>');70 top.tb_remove();71 --> 68 /* <![CDATA[ */ 69 var win = window.dialogArguments || opener || parent || top; 70 win.send_to_editor('<?php echo addslashes($html); ?>'); 71 /* ]]> */ 72 72 </script> 73 73 <?php 74 74 exit; -
wp-admin/js/media-upload.js
1 1 // send html to the post editor 2 2 function send_to_editor(h) { 3 var win = window.dialogArguments || opener || parent || top; 3 if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.activeEditor ) && !ed.isHidden() ) { 4 ed.focus(); 5 if (tinymce.isIE) 6 ed.selection.moveToBookmark(tinymce.EditorManager.activeEditor.windowManager.bookmark); 4 7 5 tinyMCE = win.tinyMCE; 6 if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.getInstanceById('content') ) && !ed.isHidden() ) { 7 tinyMCE.selectedInstance.getWin().focus(); 8 tinyMCE.execCommand('mceInsertContent', false, h); 8 ed.execCommand('mceInsertContent', false, h); 9 9 } else 10 win.edInsertContent(win.edCanvas, h); 10 edInsertContent(edCanvas, h); 11 12 tb_remove(); 11 13 } 12 14 13 15 // thickbox settings … … 35 37 $(this).attr( 'href', href + '&width=' + ( W - 80 ) + '&height=' + ( H - 85 ) ); 36 38 }); 37 39 }; 40 41 jQuery('a.thickbox').click(function(){ 42 if ( typeof tinyMCE != 'undefined' && tinyMCE.activeEditor ) { 43 tinyMCE.get('content').focus(); 44 tinyMCE.activeEditor.windowManager.bookmark = tinyMCE.activeEditor.selection.getBookmark('simple'); 45 } 46 }); 38 47 39 48 $(window).resize( function() { tb_position() } ); 40 49 });
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)