diff options
Diffstat (limited to 'wp-admin/inline-uploading.php')
| -rw-r--r-- | wp-admin/inline-uploading.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/wp-admin/inline-uploading.php b/wp-admin/inline-uploading.php index d65f450..1dbb7db 100644 --- a/wp-admin/inline-uploading.php +++ b/wp-admin/inline-uploading.php @@ -413,7 +413,6 @@ function updateOtherIcon(n) { var win = window.opener ? window.opener : window.dialogArguments;
if (!win) win = top;
tinyMCE = win.tinyMCE;
-richedit = ( typeof tinyMCE == 'object' && tinyMCE.configs.length > 0 );
function sendToEditor(n) {
o = document.getElementById('div'+n);
h = o.innerHTML.replace(new RegExp('^\\s*(.*?)\\s*$', ''), '$1'); // Trim
@@ -423,7 +422,7 @@ function sendToEditor(n) { h = h.replace(new RegExp('<(/?)A', 'g'), '<$1a'); // Lowercase tagnames
h = h.replace(new RegExp('<IMG', 'g'), '<img'); // Lowercase again
h = h.replace(new RegExp('(<img .+?")>', 'g'), '$1 />'); // XHTML
- if ( richedit )
+ if ( typeof tinyMCE != 'undefined' && tinyMCE.getInstanceById('content') )
win.tinyMCE.execCommand('mceInsertContent', false, h);
else
win.edInsertContent(win.edCanvas, h);
|
