How can I make this code work inside the rich text editor?
function whichElement(e)
{
rte = currentRTE;
var targ;
if (!e)
{
var e = window.event;
}
if (e.target)
{
targ=e.target;
}
else if (e.srcElement)
{
targ=e.srcElement;
}
if (targ.nodeType==3) // defeat Safari bug
{
targ = targ.parentNode;
}
var imgRTE = document.getElementById(“rteTableButton1”);
imgRTE.style.border = ‘2px blue solid’;
//var tname;
//tname=targ.tagName;
//alert(“You clicked on a ” + tname + ” element.”);
};
rtehtml += ‘<iframe onfocus=”dlgCleanUp();” id=”iframe’+rte+'” onmousedown=”whichElement(event);” frameborder=”0″ src=”‘ + includesPath + ‘blank.htm” style=”top:0px;’;