summaryrefslogtreecommitdiffstats
path: root/wp-admin/js/media-upload.js
diff options
context:
space:
mode:
Diffstat (limited to 'wp-admin/js/media-upload.js')
-rw-r--r--wp-admin/js/media-upload.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/wp-admin/js/media-upload.js b/wp-admin/js/media-upload.js
new file mode 100644
index 0000000..b8c615d
--- /dev/null
+++ b/wp-admin/js/media-upload.js
@@ -0,0 +1,12 @@
+// send html to the post editor
+function send_to_editor(h) {
+ var win = window.opener ? window.opener : window.dialogArguments;
+ if ( !win )
+ win = top;
+ tinyMCE = win.tinyMCE;
+ if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.getInstanceById('content') ) && !ed.isHidden() ) {
+ tinyMCE.selectedInstance.getWin().focus();
+ tinyMCE.execCommand('mceInsertContent', false, h);
+ } else
+ win.edInsertContent(win.edCanvas, h);
+} \ No newline at end of file