Could you please clarify what you want to achieve? Maybe provide a sketch of what it should look like. Please also clarify which version of bpmn-js you are using.
“bpmn-js”: “^11.1.0” versions,
I want that when selecting a certain view from menu entries, a small icon appeared on top of my block
as shown in the picture
The icons displayed in the menu are unrelated to the icon displayed in the elements. Clicking a default replace menu entry triggers the creation of a certain element type. Do you wish to have a custom element and add the correspondent entry for it in the replace menu?