]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/js/media-upload.js
Wordpress 2.5.1
[autoinstalls/wordpress.git] / wp-admin / js / media-upload.js
1 // send html to the post editor
2 function send_to_editor(h) {
3         var win = window.opener ? window.opener : window.dialogArguments;
4         if ( !win )
5                 win = top;
6         tinyMCE = win.tinyMCE;
7         if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.getInstanceById('content') ) && !ed.isHidden() ) {
8                 tinyMCE.selectedInstance.getWin().focus();
9                 tinyMCE.execCommand('mceInsertContent', false, h);
10         } else
11                 win.edInsertContent(win.edCanvas, h);
12 }