Re: getHTML() doesn't work when Cute Editor is in a hidden div

  •  08-19-2009, 3:11 AM

    Re: getHTML() doesn't work when Cute Editor is in a hidden div

    Hi BruceWMorgan,
     
    I can not reproduce this issue.
     
    Please tye the example below
     
    1. <%@ Page Language="C#" %>   
    2.   
    3. <%@ Register Assembly="CuteEditor" Namespace="CuteEditor" TagPrefix="CE" %>   
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   
    5.   
    6. <script runat="server">   
    7.     protected override void OnLoad(EventArgs e)   
    8.     {   
    9.         editor1.Text = "this is a test";   
    10.         base.OnLoad(e);   
    11.     }   
    12.     
    13. </script>   
    14.   
    15. <html xmlns="http://www.w3.org/1999/xhtml">   
    16. <head id="Head1" runat="server">   
    17.     <title>test</title>   
    18. </head>   
    19. <body>   
    20.     <form id="form1" runat="server">   
    21.     <div style="visibility: hidden">   
    22.         <CE:Editor ID="editor1" runat="server">   
    23.         </CE:Editor>   
    24.     </div>   
    25.     <input type="button" value="ShowEditorText" onclick="show()" />   
    26.     </form>   
    27. </body>   
    28. </html>   
    29.   
    30. <script type="text/javascript">   
    31. function show()   
    32. {   
    33. var editor1=document.getElementById('<%= editor1.ClientID %>');   
    34. alert(editor1.getHTML());   
    35.   
    36. }   
    37. </script>  
    Regards,
     
    Ken
View Complete Thread