MxGraph
MxGraph copied to clipboard
Cliparts are not visible in the frontend
If cliparts are used in a diagramm, there are visible in the backend, but not in the frontend.

If I create an image with the src of the svg, the cliparts will not show up, but if I include directly the SVG, everything looks fine:

Currently, I solved this with this Javascript:
[...document.querySelectorAll('.sandstorm-mxgraph-diagram img')].forEach(
(image) => {
fetch(image.src)
.then((response) => response.text())
.then((svg) => {
image.parentNode.innerHTML = svg;
})
.catch(console.error.bind(console));
}
);