mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-07 21:28:13 +02:00
12 lines
407 B
JavaScript
12 lines
407 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' && tinyMCE.getInstanceById('content') ) {
|
||
|
tinyMCE.selectedInstance.getWin().focus();
|
||
|
tinyMCE.execCommand('mceInsertContent', false, h);
|
||
|
} else
|
||
|
win.edInsertContent(win.edCanvas, h);
|
||
|
}
|