Skip to content

A simple element template chooser for properties-panel >= 1.

License

Notifications You must be signed in to change notification settings

bpmn-io/element-template-chooser

Repository files navigation

@bpmn-io/element-template-chooser

CI

A simple element template chooser for properties-panel >= 1.

screenshot

Usage

import BpmnModeler from 'bpmn-js/lib/Modeler';

import '@bpmn-io/element-template-chooser/dist/element-template-chooser.css';

import ElementTemplateChooserModule from '@bpmn-io/element-template-chooser';

const modeler = new BpmnModeler({
  additionalModules: [
    ...
    ElementTemplateChooserModule
  ],
  ...
});

// load templates
modeler.on('elementTemplates.errors', event => {
  const { errors } = event;

  showTemplateErrors(errors);
});

modeler.get('elementTemplatesLoader').setTemplates(ELEMENT_TEMPLATES_JSON);

// choose via the properties panel, _OR_
// open the chooser programmatically for a given element
const template = await (
  modeler.get('elementTemplateChooser').open(element)
);

Checkout ./example for a full featured integration example.

Run locally

To run the example app, execute:

npm start

License

MIT

About

A simple element template chooser for properties-panel >= 1.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •