-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace foreignObject with standard SVG #2688
Comments
Some diagrams have a
I'm pretty sure this is also because of CSS issues, see #2102, since mermaid is using some newer CSS features that are not yet supported by Inkscape. Using simpler CSS might fix it. |
You're right, using this config file generates better results:
Office will display it correctly. In Inkscape, it will only after you open the style selector (probably a bug). |
It might be possible to make It's been reported too in mermaid-js/mermaid-cli#103 and https://gitlab.com/inkscape/inbox/-/issues/3268#note_378199615, so there's quite a big demand for it. |
WorkaroundGenerate a PDF:
Use pdf2svg to extract SVG:
|
@lmoellendorf why not using the |
Is your feature request related to a problem? Please describe.
An SVG file generated by Mermaid cannot be edited using Inkscape (all boxes are black). When inserting an SGV file to an Office document, text does not appear.
Describe the solution you'd like
Instead of using HTML code embedded in
foreignObject
elements, Mermaid should instead use simpletext
elements (similar to Graphviz) in order to ensure that the file can be processed by SVG-compatible any application.Describe alternatives you've considered
An inkscape plugin exists to convert
foreignObject
elements, but it has approximate results.Additional context
See also here.
The text was updated successfully, but these errors were encountered: