Re: Attach event does not work - Need urgent help

  •  09-08-2005, 11:56 AM

    Re: Attach event does not work - Need urgent help

    That examle just show you how to attach your event to the editor. You don't need a button to attach it.
     
    I've modified the example for you.
     
    Here is the code:
     
    <%@ Page Language="C#" %> <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %> <html> <body> <form runat="server"> <h1>attach Event</h1> <hr/> <p>This example shows you how to attach/detach client events to customize the application.</p> <CE:Editor EditorWysiwygModeCss="style.css" id="Editor1" runat="server" ></CE:Editor> </form> <script language="JavaScript" type="text/javascript" > window.onload = function() { // get the cute editor instance var editor1 = document.getElementById('<%=Editor1.ClientID%>'); //Get the editor content var editdoc=editor1.GetDocument(); // attach Event editdoc.attachEvent('onkeypress',HandleChange); } function HandleChange() { // get the cute editor instance var editor1 = document.getElementById('<%=Editor1.ClientID%>'); //Get the editor content var editdoc=editor1.GetDocument(); alert(editdoc.body.innerHTML); } </script> </body> </html>

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View Complete Thread