Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
Cannot remove toolbar items
posted

Hello,

Any ideas why this code does not work? 

DetailEditorIG = New WebHtmlEditor()
DetailEditorIG.Toolbar.Items.Remove(ToolbarItemType.FontColor)

...

No matter what I try,  toolbar items that I remove programatically still show up on the editor.

Crile

 

 

  • 24497
    posted

    Hi Crile,

    The WebHtmlEditor creates/validates default items within its OnLoad or Render events. However, if by that time application already added its own items, then those items have priority and no default items are added. If you create control in codes, then you may first add OnLoad handler to WebHtmlEditor, add editor to Form and modify items within that OnLoad handler.

    Or you may create editor within Page.OnInit, add it to form and modify items within Page.OnLoad.