Hi guys. Does anyone know the counterpart of Javascript's .pasteHTML method in Firefox and other browsers? It works fine only in IE. I'm using an FCK Editor as my WYSIWYG control. Here is my code snippet:
var oFCKeditor = FCKeditorAPI.GetInstance(objname);
var selection = (oFCKeditor.EditorWindow.getSelection ? oFCKeditor.EditorWindow.getSelection() : oFCKeditor.EditorDocument.selection);
var sRange;
var sHtml;
//IE
if(selection.createRange)
{
sRange = selection.createRange();
sHtml = sRange.htmlText;
}
//Other Browsers
else
{
sRange = selection;
sHtml = sRange;
}
sRange.pasteHTML(str1 + sHtml + str2);
What I'm trying to do is to insert an HTML code to a selected range. I'd appreciate your help on this. TIA.