template: '<div><input type="button" value="Submit"></div>'
I tried
<div><input type="button" value="Submit" onClick="myFunction"></div> .. but this does not work.. but works in normal react..
//Initializes the nodes for the diagram
let nodes = [
{
id: "NewIdea",
width: 200,
height: 60,
offsetX: 200,
offsetY: 80,
shape: {
type: 'HTML',
content: '<div style="background:#6BA5D7;height:100%;width:100%;"><button type="button" id="button" style="width:100px"> Button</button></div>',
},
},
];
export class Default extends SampleBase {
rendereComplete() {
//click event for html content
document.getElementById("button").onclick = function () {
alert("button")
}
}
} |