[FIXED] [#880] [3.3] HtmlEditor text is "undefined"

  1. #1

    [FIXED] [#880] [3.3] HtmlEditor text is "undefined"

    Hi,

    Please run the code sample below and observe that setting HtmlEditor's text to empty string on the server results in the "undefined" string on the client.

    <%@ Page Language="C#" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                this.HtmlEditor1.Text = "";
            }
        }
    
        protected void Submit(object sender, DirectEventArgs e)
        {
            X.Msg.Alert("Submit", "The following has been submitted:<br/><br/>" + this.HtmlEditor1.Text).Show();
        }
    </script>
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>HtmlEditor - Ext.NET Examples</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server">
            </ext:ResourceManager>
            <ext:FormPanel runat="server">
                <Items>
                    <ext:HtmlEditor
                        ID="HtmlEditor1"
                        runat="server"
                        Width="600"
                        EnableAlignments="false"
                        EnableFontSize="false"
                        CreateLinkText="My CreateLinkText">
                        <ButtonTips>
                            <BackColor Text="My BackColor Tip" />
                            <Bold Text="My Bold Tip" />
                        </ButtonTips>
                    </ext:HtmlEditor>
                    <ext:Button runat="server" Text="Submit" OnDirectClick="Submit" />
                </Items>
            </ext:FormPanel>
        </form>
    </body>
    </html>
    Last edited by Daniil; Aug 25, 2015 at 10:41 AM. Reason: [FIXED] [#880] [3.3]
  2. #2
    Hi Vadym,

    "undefined" appears even if don't set .Text to an empty string (which is actually just ignored, i.e. not rendered to client).

    Created an Issue.
    https://github.com/extnet/Ext.NET/issues/880

    I am investigating.
  3. #3
    Fixed in the revision 3548 (trunk). It goes to the 3.3 release.

Similar Threads

  1. [CLOSED] HtmlEditor.Call("append", "xxx") does not work
    By hdsoso in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Feb 17, 2014, 11:36 PM
  2. HtmlEditor - restrict to use "B" "I" "U" only
    By Nelson in forum 1.x Help
    Replies: 1
    Last Post: Sep 27, 2012, 12:20 PM
  3. Replies: 8
    Last Post: May 30, 2011, 5:55 PM
  4. Replies: 4
    Last Post: Apr 29, 2011, 6:49 PM
  5. Replies: 9
    Last Post: Apr 25, 2011, 8:23 PM

Tags for this Thread

Posting Permissions