Possible to change paletteprovider etc when building modeler

Is it possible to set the paletteprovider etc when creating the modeler ?

For example - something like :

     var renderer = new bpmnio.modeler({
                    paletteProvider:  {
                           getPaletteEntries: function(element) {
                                return actions;


(I’ve not got my head around the class injection stuff - so if I can just define it straight in code like etc…)

Hello @zz9pa,

no it is not possible to do such a thing. You can check out the Custom Elements example to see how we provide a new Palette to the modeler. In short, we replace it with our own through dependency injection, by defining it inside the custom elements module(folder) ´index.js´ file.

Hope it helps.


Actually you can simply override the paletteProvider during instantiation, too:

var customPaletteProvider = {
  getPaletteEntries: function() { ... }

new bpmnio.modeler({
  additionalModules: [
      paletteProvider: [ 'value', customPaletteProvider ]

It is just a bit more cryptic due to dependency injection that needs the module { paletteProvider: ... } and the provider definition as a value [ 'value', customPaletteProvider ].