After setting WebHtmlEditor read_only for showing HTML file,How to hide toolbar region?Thanks.
If you wanted to do this server side, you can set the WebHtmlEditor1.Toolbar.CssClass property to a css class that has a display:none.
In server side code:
and the following in your aspx:
If you wanted to do this in JavaScript, you could do this ('WebHtmlEditor' represents the client id of the editor):
It works.Another problem comes up:all icon images in toolbar show good at design time but disppear(placeholder left) at runtime when I even delete "WebHtmlEditor1.Toolbar.CssClass = "hide"; " and "<style type="text/css"> .hide { display:none; }</style> ".
I am assuming you used the server side code with css method. By icons are you referring to the toolbar button images or something else? If you mean the toolbars, are you using the JavaScript in conjunction with the server side method? If are you using both, then you want to use one or the other. If you mean the images, I would do a view source on the page to look at the rendered code. I would then examine the rendered code to see where the control is looking for the images. If you have trouble finding the images, do a find in the txt for a "<img src" string. You should find at least one for each toolbar button.
If you wanted to show your toolbars again you would just have to set the CssClass property to String.Empty. Alternatively, if you are using the JavaScript method set the editor._tb.style.display to "".
I use server side code and the icons of all tool buttons disapear but error displaying placeholders left at run time.All icons show at design time.
Hi,
I am using webHtmlEditor , i would like to to hide particulat options in the toolbar.Can any one tell me wether it is possible and how.?
There is a Toolbar property off the WebHtmlEditor. Off of that property there is an Items collection which will contain all the toolbar items the editor will display. If you wish to remove certain toolbar items, simply remove them from the collection.
This does not work. Any other ideas?
I found it.
TabStripDisplay ="false"
Thanks!
Can I hide the HTML view mode?
Thanks & Regards,
Ani
If your editor is created in aspx and it has all its items defined in aspx, then you may just remove those items from aspx within Source-view or Toolbar.Items designer at Design-view.
You also may remove them at run time. Below example for editor created in aspx and editor created dynamically.
protected void Page_Load(object sender, EventArgs e){ // editor located in aspx Infragistics.WebUI.WebHtmlEditor.ToolbarItemCollection items = this.WebHtmlEditor1.Toolbar.Items; items.Remove(Infragistics.WebUI.WebHtmlEditor.ToolbarItemType.Zoom); Infragistics.WebUI.WebHtmlEditor.BaseToolbarItem item = this.WebHtmlEditor1.FindByKeyOrAction("Bold") as Infragistics.WebUI.WebHtmlEditor.BaseToolbarItem; if(item != null) items.Remove(item); // editor created dynamically Infragistics.WebUI.WebHtmlEditor.WebHtmlEditor editor = new Infragistics.WebUI.WebHtmlEditor.WebHtmlEditor(); editor.ID = "WebHtmlEditor2"; this.form1.Controls.Add(editor); editor.Toolbar.Items.Remove(Infragistics.WebUI.WebHtmlEditor.ToolbarItemType.Italic);}