function createLink() {
if (!validateMode()) return;
var isA = getEl("A",document.getElementById('Composition')[].contentWindow.selection.createRange().parentElement());
var str=prompt("Введите адрес:", isA ? isA.href : "http:\/\/");
if ((str!=null) && (str!="http://")) {
if (document.getElementById('Composition')[].contentWindow.selection.type=="None") {
Composition.focus();
var sel=document.getElementById('Composition')[].contentWindow.selection.createRange();
sel.pasteHTML("<A HREF=\""+str+"\">"+str+"</A> ");
sel.select();
}
else formatC("CreateLink",str);
}
else document.getElementById('Composition')[].focus();
}
function createBR() {
if (!validateMode()) return;
var sel=document.getElementById('Composition').selection.createRange();
sel.pasteHTML("<br>");
sel.select();
Composition.focus();
}
<table border="1" cellpadding="0" cellspacing="0" width="100%" bordercolor='#C0C0C0' bordercolordark='#FFFFFF'><tr><td>
<IFRAME class=Composition id=Composition width="100%" height=400 frameborder=0 name="Composition">
</IFRAME>
</td></tr></table>
Пробовал менять
Composition.document.selection.createRange();
на
document.getElementById('Composition').selection.c reateRange();
Результата ни какого.