Re: trap paste command --urgent

  •  01-21-2009, 12:10 AM

    Re: trap paste command --urgent

      Hi,
     
    When clicked on paste button,I want to check whether the HTML content that is about to paste contains some tags like "position:absolute". if yes then will discard past else allow paste.
     
    and to acheive this I amusing JS code as I pasted above in this thread itself. again I'm pasting it here.
     
    <script language="JavaScript" type="text/javascript" >
    var editor1=document.getElementById("<%=Editor1.ClientID%>");
    if(editor1.IsReady)CuteEditor_OnInitialized(editor);

    function CuteEditor_OnCommand(editor,command,ui,value)

    {        //handle the command by yourself

            if(command=="Paste")
           {
          //Some code--- IsContainsAbsoluteposition(Contentstring)???? how to
           get this Contentstring
              var answer = confirm("Click OK to stop this command.")
              if (answer)
              {
                      return true;
              }
              else{return false;}
           }
    }
    </script>
     
     this code is to trap the paste command which is working, but how to get the HTML content which is about to paste? so that I can check the content before it gets pasted on editor.
     
    Hopefully now you guys understand what I'm asking for.

    Do you have any chat/phone support for "cuteEditor for ASP.Net"? if yes please provide the details.
     
    Thanks.
     
     
View Complete Thread