Hi Rameshdurai,
Please try the example below, it shows you how to catch the focus/blur function of editor.
- <%@ Page Language="C#" %>
-
- <%@ Register Namespace="CuteEditor" Assembly="CuteEditor" TagPrefix="CE" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head id="Head1" runat="server">
- <title>example</title>
- </head>
- <body>
- <form id="form1" runat="server">
- <input type="text" id="text1" />
- <p>Please note that textbox text changes when the focus change </p>
- <CE:Editor ID="editor1" runat="server">
- </CE:Editor>
-
- </form>
- </body>
- </html>
-
- <script>
- var text1=document.getElementById("text1");
- function CuteEditor_OnInitialized(editor)
- {
- var editdoc = editor.GetDocument();
-
- if(document.attachEvent)
- {
-
- editdoc.onfocusin=function()
- {
- text1.value="focus in";
- }
- editdoc.onfocusout=function()
- {
- text1.value="focus out";
- }
- }
-
- else
- {
- editdoc.body.addEventListener("focus",focusIn,false);
- editdoc.body.addEventListener("blur",focusOut,false);
- }
- }
- function focusIn()
- {
- text1.value="firefox in";
- }
- function focusOut()
- {
- text1.value="firefox out";
- }
- </script>
Regards,
Ken