Please check the following code....its not working...saying "element is not defined"
function CuteEditor_OnCommand(editor,command,ui,value
{
var editor1=document.getElementById("<%=Editor2.ClientID%>");
if(command=="Paste")
{
var r = document.body.createTextRange() ;
r.moveToElementText(element) ;
r.execCommand("Paste") ;
sHTML = element.innerHTML ;
alert(sHTML);
if (sHTML.search(/position: absolute/)!=-1 || sHTML.search(/position:absolute/)!=-1 || sHTML.search(/position : absolute/)!=-1 || sHTML.search(/position :absolute/)!=-1)
{
var answer = confirm("The Content you paste might not display properly. Click OK to continue.")
if (answer)
{
return true;
}
else
{
return false;
}
}
else
{
return true;
}
}
}