Hello,
I am adding a WebHtmlEditor dynamically through code to a web page. By default, all the buttons in the toolbar seem to be available. How (through code) do I remove buttons I do not want?
Thanks
After a few hours surfing forum posts (and losing some hair), I've come up with this solution
Drop an HTML Edit control onto an aspx page.
Use the Quicj Design to remove any buttons you dont want, then (still in the QuickDesign" click the "Skins" option on the lefthandside.
Click "Save" - and a "Myskin.xml" will be created on your harddrive (my machione seemed to need to save it to 'C:\Inetpub\wwwroot\aspnet_client\Infragistics\skins')
Copy this xml file from C:\Inetpub\wwwroot\aspnet_client\Infragistics\skins to your web app directory.
In code you can then do :
Dim
HTMLEdit As New Infragistics.WebUI.WebHtmlEditor.WebHtmlEditor
HTMLEdit.LoadSkin(HttpContext.Server.MapPath("MySkin.xml"))
Mycontrol.controls.add(HTMLEdit)
Htmledit then renders with the correct formatting
Thanks for the tip....I used the following:
MyEditor.TabStripDisplay = False
They call it "HtmlBoxTabStrip " Hope that helps.
Does anyone know of a way to remove the "Design / HTML" buttons at the bottom of the editor?
I was unable to remove the buttons through code, but was able to through the html source. Here, I only add the toolbars I want to see:
<ig_edit:WebHtmlEditor Width="95%" ID="txtEdit" SpellCheckerID="igSpellCheck" runat="server"> <Toolbar> <ig_edit:ToolbarButton Type="Bold" runat="server" /> <ig_edit:ToolbarButton Type="Italic" runat="server" /> <ig_edit:ToolbarButton Type="Underline" runat="server" /> <ig_edit:ToolbarImage Type="Separator" runat="server" /> <ig_edit:ToolbarButton Type="JustifyLeft" runat="server" /> <ig_edit:ToolbarButton Type="JustifyCenter" runat="server" /> <ig_edit:ToolbarButton Type="JustifyRight" runat="server" /> <ig_edit:ToolbarImage Type="Separator" runat="server" /> <ig_edit:ToolbarButton Type="UnorderedList" runat="server" /> <ig_edit:ToolbarButton Type="OrderedList" runat="server" /> <ig_edit:ToolbarImage Type="Separator" runat="server" /> <ig_edit:ToolbarButton Type="Outdent" runat="server" /> <ig_edit:ToolbarButton Type="Indent" runat="server" /> <ig_edit:ToolbarImage Type="Separator" runat="server" /> <ig_edit:ToolbarButton Type="SpellCheck" runat="server" /> </Toolbar></ig_edit:WebHtmlEditor>