How to disable editing function with moddler?

my bpmn file maybe has some custom elements ,the viewer can not display it. so How to disable editing function

Which custom elements does it contain?

Why can’t the viewer display it?

Why would you like to learn about a dirty workaround for this issue rather than understanding the real solution to your problem?

1 Like

because the custom elements show with svg image, the viewer can not render be rendered Original class

How are the custom elements visible if they can’t be rendered? like this example , I want show someone this bpmn file,but if I use viewer the cat will be rendered a “bpmn:ServiceTask” not the I want know if I can disabled editing function .because I won’t person edit it again .

Sorry, it’s incredibly hard to understand your question.

So you want to use the Viewer with the example instead of the Modeler?

import BpmnModeler from 'bpmn-js/lib/Modeler'; // you want to use the Viewer instead?

import resizeAllModule from 'bpmn-js-nyan/lib/resize-all-rules';
import colorPickerModule from 'bpmn-js-nyan/lib/color-picker';
import nyanDrawModule from 'bpmn-js-nyan/lib/nyan/draw';
import nyanPaletteModule from 'bpmn-js-nyan/lib/nyan/palette';

var bpmnJS = new BpmnModeler({
  additionalModules: [

The Nyan Cat renderer doesn’t work when you use the Viewer?

Share your code and we might be able to help you.

I hava set edit tools display none by css, but these elements still can be dragged , anyway thank you for your enthusiasm.

Ok, good luck…