7d6440bba2
git-svn-id: https://develop.svn.wordpress.org/trunk@7172 602fd350-edb4-49c9-b593-d223f7449a82
12 lines
430 B
JavaScript
12 lines
430 B
JavaScript
// 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);
|
|
} |