Access to definitions from the viewer

Hi, I’m trying to add some new tags to insert metaInformation inside the model. I create a json to extend an Element and now i had to create a node to inject the new extended element. But i’m not able to access the definitions… i’m using BpmnJS so i have a viewer= new BpmnJs() but neither viewer_definitions nor viewer.getDefinitions() works. but, if i print the viewer i can see the field _definitions…
Please help

Can you share the relevant code?

1 Like

Don’t worry i fixed it