How to add elements containing text inside it in the pallete?

Hey,

when defining an entry in the PaletteProvider you can provide custom html. If you for example create a div containing text, this is what is displayed in the palette. You probably have to do some CSS styling though:

'my-entry': {
  group: 'event',
  html: '<div class="entry">My Text</div>',
  action: {
    click: function(event) {
      var shape = elementFactory.createShape({ type: 'bpmn:StartEvent' });
      create.start(event, shape);
    }
  }
}
1 Like