How to set label to an element having its id?

How to modify the text of an element having its id?

Sure, here you go:

const element = elementRegistry.get('myElementId');

modeling.updateProperties(element, { name: 'Foo' });

CodeSandbox: Update Label - CodeSandbox

1 Like