Custom HTML

This is an item that contains any custom HTML content (for example, an image, icon or other element).

Adding Custom HTML

Any custom HTML content can be easily added to a toolbar with the help of the add() method of Tree Collection:

toolbar.data.add({
    type: "customHTML",
    html: "<img src='../logo.svg' alt=''/>",
    css: "logo-container"
});

Related sample:  Custom HTML - DHTMLX Toolbar

Attributes

  • type - (string) required, the item type, set it to "customHTML"
  • id - (string) the id of an item, auto-generated if not set
  • html - (string) a string with HTML that should be inserted into the item
  • css - (string) adds style classes
  • parent - (string) the parent of the item

Working with Custom HTML

You can perform operations over the Custom HTML item with the help of the available Toolbar API and Tree Collection API.

Back to top