igwane
01-14-2004, 04:13 AM
Hi,
I've got a little problem using a javascript fonction : pasteHTML
see code and problems below
Thanks in advance for replies ;)
function editor_insertHTML(objname, str1,str2) {
var config = document.all[objname].config;
var editor_obj = document.all["_" +objname + "_editor"]; // editor
object
var editdoc = editor_obj.contentWindow.document;
sRange = editdoc.selection.createRange();
var sHtml = sRange.htmlText;
sRange.pasteHTML(str1 +sHtml+ str2);
}
Here is the link to function :
javascript:editor_insertHTML('textFR','<A HREF=\'Page.jsp\'>','</A>');
Here is the code added to my iframe :
<A
href="http://www.urltest.com/admin/Page.jsp">test</A>
I would like to have: <A href="Page.jsp">test</A>
Any idea ?
I've got a little problem using a javascript fonction : pasteHTML
see code and problems below
Thanks in advance for replies ;)
function editor_insertHTML(objname, str1,str2) {
var config = document.all[objname].config;
var editor_obj = document.all["_" +objname + "_editor"]; // editor
object
var editdoc = editor_obj.contentWindow.document;
sRange = editdoc.selection.createRange();
var sHtml = sRange.htmlText;
sRange.pasteHTML(str1 +sHtml+ str2);
}
Here is the link to function :
javascript:editor_insertHTML('textFR','<A HREF=\'Page.jsp\'>','</A>');
Here is the code added to my iframe :
<A
href="http://www.urltest.com/admin/Page.jsp">test</A>
I would like to have: <A href="Page.jsp">test</A>
Any idea ?