locked
HTML Editor submits instead of adding a new line on enter RRS feed

  • Question

  • User50461059 posted

    Hi,

    im using the ajax control toolkit and the html editor like in the examples

    <asp:Panel ID="pnlText" runat="server" CssClass="form-box-100">
                    <asp:TextBox runat="server"
                        ID="txtText"
                        TextMode="MultiLine"
                        Columns="50"
                        Rows="10"
                        Text="" CssClass="text-editor" Width="810px" />
    
                    <ajaxToolkit:HtmlEditorExtender
                        ID="htmlEditorExtender1"
                        TargetControlID="txtText"
                        runat="server">
                    </ajaxToolkit:HtmlEditorExtender>
                </asp:Panel>
                <asp:Panel ID="pnlSave" runat="server" CssClass="form-box-100-right">
                    <asp:Button ID="btnSave" runat="server" Text="Speichern" CssClass="save-button" ValidationGroup="create" />
                </asp:Panel>

    my problem is, that whenever i click the enter key, it submits the page instead of adding a new line. Why is it like this? In this example it adds a new line:

    http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/HTMLEditorExtender/HTMLEditorExtender.aspx

    Thanks alot

    Tuesday, October 22, 2013 10:02 AM

Answers

  • User-933407369 posted

    hi lebsites ,

    i would suggest you try to add UpdatePanel control, seems like below:

     <asp:UpdatePanel ID="updatePanel1" runat="server">                    
                <ContentTemplate>    
                <asp:Panel ID="pnlText" runat="server" CssClass="form-box-100">
                    <asp:TextBox runat="server"
                        ID="txtText"
                        TextMode="MultiLine"
                        Columns="50"
                        Rows="10"
                        Text="" CssClass="text-editor" Width="810px" />
                    <ajaxToolkit:HtmlEditorExtender
                        ID="htmlEditorExtender3"
                        TargetControlID="txtText"
                        runat="server">
                    </ajaxToolkit:HtmlEditorExtender>
                </asp:Panel>
                <asp:Panel ID="pnlSave" runat="server" CssClass="form-box-100-right">
                    <asp:Button ID="btnSave" runat="server" Text="Speichern" CssClass="save-button" ValidationGroup="create" />
                </asp:Panel>
               </ContentTemplate>
               </asp:UpdatePanel>

    i hope it helps you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 23, 2013 5:19 AM