locked
HtmlEditorExtender not displaying textbox.... RRS feed

  • Question

  • User-153404742 posted

    <div class="tab-pane" id="create" style="height: 700px;" runat="server">

    <asp:UpdatePanel ID="upCreate" runat="server">
    <ContentTemplate>

    <asp:DropDownList ID="ddlTemplate" runat="server" OnSelectedIndexChanged="ddlTemplate_SelectedIndexChanged" AutoPostBack="true" Width="150px" />

    <asp:TextBox ID="tbEditor" runat="server" TextMode="MultiLine" Height="400" Width="600"></asp:TextBox>

    <asp:HtmlEditorExtender DisplaySourceTab="true" id="editorNote" TargetControlID="tbEditor" runat="server">
    </asp:HtmlEditorExtender>

    </ContentTemplate>

    </asp:UpdatePanel>

    So with the above code, I have a few tabs that uses bootstrap.  When this control is used on regular page and it's not within a tab control, it displays fine.  With the control in the above tab pane, the Editor only displays when postback occurs when dropdownlist item is changes...otherwise, when I click on the tab, the other controls show but the editor shows only a thin gray vertical line (which when hovered over tiny spaces, it displays the toolbox control.....).  So If I add the ToolBox item to only have one item, the gray vertical bar is tiny only probably holding space for that one control  So how do I ensure the control loads initially without doing a postback?  This tab panes is actually in a modal pop up....I have other modal pop up as well but that one doesn't have tabs so it works fine so it's not the modal pop up that is the issue but the tabs.

    Friday, May 15, 2020 3:45 PM

All replies

  • User1535942433 posted

    Hi inkaln,

    Accroding to your description and codes,I create a test.I'm guessing that you cann't display the HtmlEditorExtender of regular size.

    As far as I think,do you have other to affect it?Could you post full codes to us?It will help us to solve your problems.

    More details,you could refer to below codes:

    <head runat="server">
        <title></title>
        <script src="Scripts/jquery-1.10.2.min.js"></script>
        <script src="Scripts/bootstrap.min.js"></script>
        <link href="Content/bootstrap.min.css" rel="stylesheet" />
    </head>
    <body>
        <form id="form1" runat="server">
            <asp:Button ID="Button1" runat="server" Text="Button" />
            <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
            <asp:Panel ID="Panel1" runat="server">
                <div class="tab-pane" id="create" style="height: 700px;" runat="server">
                    <asp:UpdatePanel ID="upCreate" runat="server">
                        <ContentTemplate>
                            <asp:DropDownList ID="ddlTemplate" runat="server" OnSelectedIndexChanged="ddlTemplate_SelectedIndexChanged" AutoPostBack="true" Width="150px">
                                <asp:ListItem Value="1" Text="1"></asp:ListItem>
                                <asp:ListItem Value="2" Text="2"></asp:ListItem>
                            </asp:DropDownList>
                            <asp:TextBox ID="tbEditor" runat="server" TextMode="MultiLine" Height="400" Width="600"></asp:TextBox>
                            <ajaxToolkit:HtmlEditorExtender DisplaySourceTab="true" ID="editorNote" TargetControlID="tbEditor" runat="server">
                             
                            </ajaxToolkit:HtmlEditorExtender>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </asp:Panel>
    
            <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="Button1" PopupControlID="Panel1"></ajaxToolkit:ModalPopupExtender>
    
        </form>
    </body>

    Result:

    Best regards,

    Yijing Sun

    Monday, May 18, 2020 5:21 AM
  • User-153404742 posted

    I got that working....was an issue with css....but now I have different issue.  So copy/paste from MS Word or other places actually works...preview shows it in the text editor.  When I try to grab the .Text value of the textbox, it's returning an empty string.  If I type the same text directly into the textbox, it works fine.  I had it working for a control that has all the default buttons in the toolbar but for the ones that have <Toolbar> option added with specific buttons only, the copy/paste doesn't work.  Any ideas on how to include only certain buttons but have the copy/paste still work?

    Also, is there a way to add tooltips to the bottom two tools that show up?  When hovering over the toolbar buttons on the top, it displays the text/name of that tool but I need to add these to the bottom toolbar

    Tuesday, May 19, 2020 8:57 PM
  • User1535942433 posted

    Hi inkaln,

    So copy/paste from MS Word or other places actually works...preview shows it in the text editor.  When I try to grab the .Text value of the textbox, it's returning an empty string.  If I type the same text directly into the textbox, it works fine. 

    Accroding to your description,I don't understand your requirment clearly.Could you tell us what works fine and how to paste to return an empty string.

    You could tell us more details or you could post your result to us.It will help us to solve your problems.

    Best regards,

    Yijing Sun

    Thursday, May 21, 2020 7:31 AM