Scusate, quel metodo per FF fa confusione con i tag html ecco il nuovo ancora più semplice e, dai pochi test che ho fatto, funzionante:

codice:
var str=prompt("Enter url:", "http:\/\/");
	iFrameDoc = eval(str_iFrameDoc); 
	var a = document.getElementById('Composition').contentWindow.getSelection();
	
	if(a==''){
		a=str;
	}
	linko= "<A target=\"_blank\" HREF=\""+str+"\">"+a+"</A> ";
	formatC('insertHtml', linko);
Ciao