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

I am referring to the project placed at https://bpmn.io/blog/posts/2015-locking-down-bpmn-js.html

Can someone help me how to include an element containing text inside it ?

1 Like

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

Hello,

Thanks this worked ! i will check for css, which javascript file should i change to increase the width of palette. Please help.