Html

12 Sep 20251 minute to read

Defines the behavior of html shape

Properties

content string|HTMLElement|Function

Defines the geometry of a html element.

<div id='diagram'></div>
let nodes: NodeModel[] = [{
id: 'node1', width: 100, height: 100, offsetX: 300, offsetY: 100,
shape: { type: 'HTML',
content: '<div style="background:red;height:100%;width:100%;"><input type="button" value="{{:value}}" /></div>' }
}];
let diagram: Diagram = new Diagram({
...
nodes: nodes
...
});
diagram.appendTo('#diagram');

Defaults to ’’

type Shapes

Defines the type of node shape.

Defaults to ‘Basic’