Re: Add a Event to Textarea in CE

  •  02-02-2006, 1:30 AM

    Re: Add a Event to Textarea in CE

    My Source Code :
    <%@ Page Language="C#"%>
    <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
      <meta name="ProgId" content="SharePoint.WebPartPage.Document">
      <meta name="WebPartPageExpansion" content="full">
      <title>ASP and ASP.NET WYSIWYG Editor - Default Configuration </title>
      <link rel="stylesheet" href="../example.css" type="text/css" />
            <form runat="server">
       <table border="0" cellpadding="0" cellspacing="0">
         <td width=10 nowrap></td>
         <td valign="top" nowrap id="leftcolumn" width="160">
         <td width="20" nowrap></td>
         <td valign="top" width="760">
          <b>Enable All Toolbars</b>
          This example show you <b>all the predefined buttons</b>.
    <INPUT id="blang" class="btchzaban" onclick="chzaban()" type="button" value="FA" name="blang" title=" CTRL + L " ><br>
     <CE:Editor id="Editor1" EditorWysiwygModeCss="../example.css" runat="server" ></CE:Editor><br />
     <script language="JavaScript" type="text/javascript" >
            // JavaScript source code

    function keyConv(e)
    function chzaban()
    function CE_attachEvent()
        // get the cute editor instance
        var editor1 = document.getElementById('CE_Editor1_ID');
        //Get the editor content 
        var editdoc=editor1.GetDocument();
        // attach Event
      editdoc.attachEvent('onkeypress', keyConv(event));
        else if(editdoc.addEventListener)
         editdoc.addEventListener('keypress', keyConv(event),true);


     I have a request : at first User Click On "FA Button", then  user must be click on  textarea and type anythings , now I want To Create an  Alert Box about KeyCode .
View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems