locked
How to remove Toolbar Of HtmlEditorExtender. RRS feed

  • Question

  • User-1868929400 posted

    Hi All,

    I am using HTMLEditorExtender.I want to give 2 modes for it.

    1)Design Mode.With Toolbar Enabled.

    2)Preview Mode with Toolbar Hidden or disabled.

    How to achive 2nd one.How to hide toolbar of HtmlEditorExtender.

    Please Help me for this.

    Regards,

    Jayesh(From India,Mumbai)

    Monday, April 7, 2014 1:35 AM

Answers

  • User-417640953 posted

    Hello,

    Thanks for your post to asp.net forum.

    There are samples about how to use the HtmlEditorExtender.

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

    For how to hide or show the toolbar buttons, you can try jquery complete it like below.

     <script src="//code.jquery.com/jquery-1.9.1.js"></script>
        <script>
            $(function () {
    
                $("#Button2").click(function () {
    
                    $(".ajax__html_editor_extender_buttoncontainer").hide();
                   
                });
                $("#Button3").click(function () {
    
                    $(".ajax__html_editor_extender_buttoncontainer").show();
                    
                });
            })
        </script>
    
            <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
            <asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" Rows="20" Width="467px"></asp:TextBox>
            <asp:HtmlEditorExtender ID="HtmlEditorExtender1" runat="server" TargetControlID="TextBox1" DisplaySourceTab="true" ></asp:HtmlEditorExtender>
    
             <input id="Button2" type="button" value="Hide" />
             <input id="Button3" type="button" value="Show" />

    Hope that helps, thanks.

    Best Regards!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 7, 2014 10:26 PM
  • User-1868929400 posted

    Thanks Fuxiang Zhang  Sir.

    Works Perfectly as i need.

    Thanks again for your help.

    Regards,

    Jayesh(From India,Mumbai)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 8, 2014 1:07 AM

All replies

  • User-417640953 posted

    Hello,

    Thanks for your post to asp.net forum.

    There are samples about how to use the HtmlEditorExtender.

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

    For how to hide or show the toolbar buttons, you can try jquery complete it like below.

     <script src="//code.jquery.com/jquery-1.9.1.js"></script>
        <script>
            $(function () {
    
                $("#Button2").click(function () {
    
                    $(".ajax__html_editor_extender_buttoncontainer").hide();
                   
                });
                $("#Button3").click(function () {
    
                    $(".ajax__html_editor_extender_buttoncontainer").show();
                    
                });
            })
        </script>
    
            <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
            <asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" Rows="20" Width="467px"></asp:TextBox>
            <asp:HtmlEditorExtender ID="HtmlEditorExtender1" runat="server" TargetControlID="TextBox1" DisplaySourceTab="true" ></asp:HtmlEditorExtender>
    
             <input id="Button2" type="button" value="Hide" />
             <input id="Button3" type="button" value="Show" />

    Hope that helps, thanks.

    Best Regards!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 7, 2014 10:26 PM
  • User-1868929400 posted

    Respected Fuxiang Zhang Sir,

    Thanks For your reply.

    I will try this solution in few sceconds.

    Regards,

    Jayesh(From India,Mumbai)

    Tuesday, April 8, 2014 12:56 AM
  • User-1868929400 posted

    Thanks Fuxiang Zhang  Sir.

    Works Perfectly as i need.

    Thanks again for your help.

    Regards,

    Jayesh(From India,Mumbai)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, April 8, 2014 1:07 AM