Error occured when editor visibility set to false during first load

Last post 02-15-2009, 8:25 PM by Kenneth. 8 replies.
Sort Posts: Previous Next
  •  11-03-2008, 2:09 AM 45314

    Error occured when editor visibility set to false during first load

    Hi
    I have 2 panels in a page where each of the panel containing 1 editor. When page first loaded Panel 2 visibility will set to false and Panel 1 visibility set to true. I have a button which switch between Panel 1 and 2 turning on and off for Panel 1 and 2 visibility.
     
    Spell checker and HTML filter function in Panel 2 was not working when Panel 2 visibility was on. Only Panel 1 editor which visibility was on once the page is loaded is working. How to solve this error? Thanks.
  •  11-03-2008, 8:07 AM 45323 in reply to 45314

    Re: Error occured when editor visibility set to false during first load

  •  11-03-2008, 6:49 PM 45344 in reply to 45323

    Re: Error occured when editor visibility set to false during first load

    Hi
    I did try with the editor reside in div it is working but what I am facing now is when the editor is reside in a panel. The visibility of panel is set in code behind when the button click event is being fired. May I know why it works in div but not in panel? Is there any way to solve this problem and make it works in Panel? Thanks.
  •  11-04-2008, 2:12 AM 45357 in reply to 45344

    Re: Error occured when editor visibility set to false during first load

    Hi ylkok,
     
     
    I can not reproduce this issue, please try following code:

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

    <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <script runat="server">
      
        protected void b1_Click(object sender, EventArgs e)
        {
            p1.Visible = false;
            p2.Visible = true;
        }

        protected void b2_Click(object sender, EventArgs e)
        {
            p1.Visible = true;
            p2.Visible = false;
        }
    </script>

    <html>
    <head>
        <title>test</title>
    </head>
    <body>
        <form runat="server" id="f1">
            <asp:Panel ID="p1" runat="server">
                <CE:Editor ID="e1" runat="server">
                </CE:Editor>
                Panel1</asp:Panel>
            <asp:Panel ID="p2" runat="server" Visible="false">
                <CE:Editor ID="e2" runat="server">
                </CE:Editor>
                Panel2</asp:Panel>
            <asp:Button ID="b1" runat="server" Text="Panel2Show" OnClick="b1_Click" />
            <asp:Button ID="b2" runat="server" Text="Panel1Show" OnClick="b2_Click" />
        </form>
    </body>
    </html>

     
     
    Regards,
     
    Ken
  •  11-04-2008, 5:55 AM 45365 in reply to 45357

    Re: Error occured when editor visibility set to false during first load

    Hi Kenneth,
     
    Here are my codes where the CuteEditor_FilterHTML function is not working when the panel which contained Editor was turn on. The panel is invisible when the form was first loaded. There is a button to turn on the panel for Editor. Thanks.
     
    Code in Default.aspx

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

    <%@ Register Assembly="Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

    Namespace="Microsoft.Web.UI" TagPrefix="asp" %>

    <%@ Register Assembly="CuteEditor" Namespace="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 runat="server">

    <title>Untitled Page</title>

    </head>

    <body>

    <form id="form1" runat="server">

    <asp:ScriptManager ID="ScriptManager1" runat="server">

    </asp:ScriptManager>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline">

    <ContentTemplate>

    <asp:Panel ID="panel1" runat="server" Visible="false">

    <CE:Editor ID="editor1" runat="server">

    </CE:Editor>

    </asp:Panel>

    </ContentTemplate>

    </asp:UpdatePanel>

    <asp:Button ID="BtnChangeVisibility" runat="server" Text="Change Visibility" OnClick="BtnChangeVisibility_OnClick" />

    </form>

    </body>

    </html>

    <script>

    function CuteEditor_FilterHTML(editor,code)

    {

    return code.replace(/(<form[^\>]*\>)([\s\S]*)(\<\/form\>)/i, "$2");

    }

    function CuteEditor_FilterCode(editor,code)

    {

    return code.replace(/(<form[^\>]*\>)([\s\S]*)(\<\/form\>)/i, "$2");

    }

    </script>

     
    Code in Default.aspx.cs
     

    using System;

    using System.Data;

    using System.Configuration;

    using System.Web;

    using System.Web.Security;

    using System.Web.UI;

    using System.Web.UI.WebControls;

    using System.Web.UI.WebControls.WebParts;

    using System.Web.UI.HtmlControls;

    public partial class _Default : System.Web.UI.Page

    {

    protected void Page_Load(object sender, EventArgs e)

    {

    }

    protected void BtnChangeVisibility_OnClick(object sender, EventArgs e)

    {

    panel1.Visible = !panel1.Visible;

    }

    }

     
  •  11-05-2008, 7:21 PM 45440 in reply to 45365

    Re: Error occured when editor visibility set to false during first load

    Hi Any updated on this issue? Thanks.
  •  11-06-2008, 9:18 PM 45490 in reply to 45357

    Re: Error occured when editor visibility set to false during first load

    Hi Any updates? Thanks.
  •  11-11-2008, 11:39 AM 45599 in reply to 45490

    Re: Error occured when editor visibility set to false during first load

    Hi ylkok,
     
    We can reproduce this, we are investigating this issue and will get back to you as soon as possible.
     
    Regards,
     
    Ken
  •  02-15-2009, 8:25 PM 48817 in reply to 45314

    Re: Error occured when editor visibility set to false during first load

    Hi ylkok,
     

    This issue is resolved.

    Please download version 6.3.

    Download:

    http://cutesoft.net/Downloads/default.aspx

    Demo:

    http://cutesoft.net/example/general.aspx

    Regards,
     
    Ken
View as RSS news feed in XML