How to access element templates in modeler javascript-object

Hey,
I created a modeler instance and loaded element templates into it. In the properties panel project I can access these templates with bo.extensionElements. I wonder, how I can access these loaded element templates in javascript directly.

Here the code:


this.modeler = new BpmnJS({
container: ‘#js-canvas’,
keyboard: {
bindTo: window,
},
additionalModules: [MoveCanvasModule, ZoomScrollModule],
moddleExtensions: {
camunda: camundaModdleDescriptor,
},
elementTemplates,
});

this.modeler.on(‘element.click’, (event) => {
console.log(element clicked, id: ${event.element.id});
console.log(element businessObject, ${event.element.businessObject});
console.log(element-templates (TODO), ${event.element.businessObject.**???**});
});

Best Regards
Alex

Please tell why you would like to access the element templates after they are loaded so that I can understand your issue.

Hey,
sure, based on https://github.com/bpmn-io/bpmn-js-examples/tree/master/bpmn-properties we want to create a properties panel in vuejs (similar to your provided properties-panel). Cause we are using element templates for user and service tasks, we need to be able to access them

Loading the element templates is your responsibility if you build your own properties panel. The Camunda Modeler loads them from from the JSON files in resources/element-templates.