Hi Julian,
Please use textChange event which triggers when the label editing is ended. In this event, you can take the text bounds and set it for node’s width and height using diagram updateNode method. Please refer to the code example and help documentation.
Code example:
<ej-diagram id="diagramCore" width="100%" height="100%" textChange="textchange($event)">
</ej-diagram>
textChange (args) {
var diagram = $("#diagram").ejDiagram("instance");
if (args && args.element) {
//get the textbox bounds
var bounds = document.getElementById(args.diagramId + "_editBox").getBoundingClientRect();
//update the node size
diagram.updateNode(args.element.name, { width: bounds.width, height: bounds.height });
}
}
Regards,
Shyam G