widthhtmleditorextender

HTMLEditorExtender width cannot fit %100


Using ajaxcontroltoolkit.as my horror film.

HTMLEditorExtender stays its prerendered width as it is even if I resize the Web Browser

it doesnt detect width resizements:Stays as how it is.

and need a full refresh of browser (F5) makes HTMLEditorExtender to re calcluate its width.

so.

is there a standart way to fix this problem ? otherwise I will use jquery to slap it.or remove this horror control.

<asp:TextBox ID="tbEditor" runat="server"
            TextMode="MultiLine" Rows="10" style="width:100%">
</asp:TextBox>
        <asp:HtmlEditorExtender ID="tbEditor_HtmlEditorExtender" runat="server" 
            Enabled="True" TargetControlID="tbEditor">
        </asp:HtmlEditorExtender>

Solution

  • a css rule

    .containerClass .ajax__html_editor_extender_container
            {
                width: 100% !important;/*important is really important at here*/
            }
    

    and a surrounding div, fixed problem.

    <div class="containerClass">
                <asp:TextBox ID="tbEditor" runat="server"
                TextMode="MultiLine" Rows="10" style="width:100%">
    </asp:TextBox>
            <asp:HtmlEditorExtender ID="tbEditor_HtmlEditorExtender" runat="server" 
                Enabled="True" TargetControlID="tbEditor">
            </asp:HtmlEditorExtender>
            </div>
    

    fixed my problem.hope this helps someone too.