Thanks for your help. The solution is working in IE but not in the firefox. I wish to get the whole outerhtml in firefox similar to the way it is done in IE.
Please suggest.
// if firefox
if(editselection.rangeCount > 0)
{
var range=editselection.getRangeAt(0);
var clonedSelection = range.cloneContents();
var div = document.createElement('div');
div.appendChild(clonedSelection);
ret = div.innerHTML;
}
Karan Singh
(Web Developer)