2008-01-09 03:14:29 -05:00
|
|
|
// 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;
|
2008-03-06 14:48:54 -05:00
|
|
|
if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.getInstanceById('content') ) && !ed.isHidden() ) {
|
2008-01-09 03:14:29 -05:00
|
|
|
tinyMCE.selectedInstance.getWin().focus();
|
|
|
|
tinyMCE.execCommand('mceInsertContent', false, h);
|
|
|
|
} else
|
|
|
|
win.edInsertContent(win.edCanvas, h);
|
2008-03-02 15:17:30 -05:00
|
|
|
}
|