Merge pull request #1788 from PetrLaskevic/develop
fix: light background with dark diagram theme when downloading SVG ([#1777](https://github.com/mermaid-js/mermaid-live-editor/issues/1777))
This commit is contained in:
@@ -50,6 +50,8 @@
|
||||
svg = getSvgElement();
|
||||
}
|
||||
|
||||
svg.style.backgroundColor = `hsl(${window.getComputedStyle(document.body).getPropertyValue('--background')})`;
|
||||
|
||||
const svgString = svg.outerHTML
|
||||
.replaceAll('<br>', '<br/>')
|
||||
.replaceAll(/<img([^>]*)>/g, (m, g: string) => `<img ${g} />`);
|
||||
|
||||
Reference in New Issue
Block a user