Adding custom elements to draw a flow diagram

I wish to add customizable icons to the panel, with my specific rules, for few elements. Is there a way around for this? And is there a way, so that I can add icons in JPG or PNG format, and then later add the rules for it?

Any guidance for this will really be appreciated.

You may add custom BPMN derived elements easily (cf. bpmn-js-nyan).

You may add custom, non-BPMN elements, too but that requires you to implement a few more modeling related operations yourself (cf. custom-elements example).

It really depends on what you need in detail. So if you are a bit more specific, we may give you more detailed guidance.

I wish to change the panel of the bpmn-io, and add few elements of my own, so that I can get the customizable flow diagram.

When I try running the Nyan Cat example, I get this as the output. I’ve forked the example and followed the instructions provided.