Skip to main content


Optional. Enables/disables rendering of HTML content (inner HTML) in List options

htmlEnable?: boolean

Default value: true


//specifies a template for List items
function template(item) {
let template = "<div className='item_name' style='font-weight: 500'>" + item.title;
template += "</div>";
template += "<div className='item_author'>";
template += item.authors + ", ";
template += item.publication_date.split("/")[2] + "</div>";
return template;

const list = new dhx.List("list_container", {
htmlEnable: false, // disables render of HTML content
template: template,
data: data

When the property is set to true, the list displays the HTML content for its options but doesn't prevent XSS attacks.

You can disable rendering of the HTML content and display it as plain text via setting the property to false.

Related sample: List. Disable HTML rendering

Change log:

added in v7.3