Re: Setting Editor.Text value when Editor block style is display:none in FireFox

  •  04-28-2009, 7:45 AM

    Re: Setting Editor.Text value when Editor block style is display:none in FireFox

    Hi Aaron,
     
    It works fine for me, please download the latest version and test the example below:
     
    Download:
     
     
    -------------------------------------------------------------->
     

    <%@ Page Language="C#" AutoEventWireup="True" %>

    <%@ 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">

    <script>
    function show()
    {
    var div1=document.getElementById("div1");
    div1.style.display="block";

    }
    function hide()
    {
    var div1=document.getElementById("div1");
    div1.style.display="none";

    }
    function sethtml()
    {
    var editor1 = document.getElementById('<%= Editor1.ClientID%>');
    editor1.setHTML("test");
    }
    </script>

    <head id="Head1" runat="server">
        <title>DataList Example</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <input id="Button1" type="button" value="show" onclick="show()" />
            <input id="Button3" type="button" value="hide" onclick="hide()" />
            <input id="Button2" type="button" value="sethtml" onclick="sethtml()" />
            <div id="div1" style="display: none">
                <CE:Editor ID="Editor1" runat="server">
                </CE:Editor>
            </div>
        </form>
    </body>
    </html>
    -------------------------------------------------------------->
     
    Regards,
     
    Ken
View Complete Thread