-
Hello ! Thank you very much for this open-bpmn project. I'm trying to customize node view with html content (interactive dropdown) inside an svg element.
actually the svg rectangle is shown but when i add an html content instead i cant display it. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Have you bound your const bpmnDiagramModule = new ContainerModule((bind, unbind, isBound, rebind) => {
.....
configureModelElement(context, 'task', TaskNode, InteractiveHtmlView);
.....
} |
Beta Was this translation helpful? Give feedback.
-
Ok, I think I understand now your problem. It is more related to SVG itself. You code should look something like this: <g class-sprotty-node={element instanceof SNode}>
<rect class-sprotty-node={element instanceof SNode} x="1" y="1" width="28" height={headerHeight}></rect>
<foreignobject class="node" x="46" y="22" width="100" height="100">
<div style="border:1px green solid">I'm a div inside a SVG.</div>
</foreignobject>
.....
</g> We use this for embedded text areas. Please let me know if this solves your problem. |
Beta Was this translation helpful? Give feedback.
-
Your embedded code should look like this: <foreignObject
requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"
height="125"
width="720"
x="0"
y="0"
>
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Nam at tellus quis lacus auctor congue vel sit amet lectus.
Cras interdum lectus vel enim mollis maximus.
</div>
</foreignObject> Remove the body tag, change the tag name to Also see the chapter ForeignObjectView here I did a short test about this: |
Beta Was this translation helpful? Give feedback.
Your embedded code should look like this:
Remove the body tag, change the tag name to
foreignObject
(case sensitive) and add the 'requiredFeatures
'.Also see the chapter ForeignObjectView here
I did a short test about this: