Tabbed editor from skeltoac. fixes #2829
git-svn-id: http://svn.automattic.com/wordpress/trunk@4206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -410,7 +410,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
|
||||
@@ -420,7 +419,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);
|
||||
|
||||
Reference in New Issue
Block a user