the component template

string|function template;


{view:"diagram-editor", template:"#value#"}

  1. Data template for data-containing components:
// the diagram will show value of each data item from the specified datasource
{ view:"diagram-editor", template:"#value#" }
  1. Function template (takes data object as a parameter):
{ view:"diagram-editor", template: obj => 
    typeof obj.value == "undefined" ? obj.id : obj.value
  1. HTML templates defined within an HTML container:
{ view: "diagram-editor", template:"html->template_container" }
  1. HTML template defined in the external file:
{ view:"diagram-editor", template:"http->template.html" }
See also
Back to top