Hi Amrutas ,
Try this code:
function CE_LineOutSelectionHTML() {
var editor1 = document.getElementById('<%=Editor1.ClientID%>');
var editor1doc = editor1.GetDocument();
var selectedhtml;
if(editor1doc.selection.type=="Control" )
{
selectedhtml = editor1doc.selection.createRange().item(0).outerHTML;
}
else
{
selectedhtml = editor1doc.selection.createRange().htmlText;
}
var html = "**BEFORESELECTION**" + selectedhtml + "**AFTERSELECTION**";
editor1.PasteHTML(html);
return;
}
Regards,
Ken