-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Handle br tag in flowchart the same way as in sequenceDiagram (especially when exporting to SVG) #1111
Comments
I can take a look here, because I'm also interested in #702 which is about line breaks in sequence diagrams. |
Great! Make sure to make two separate prs for these issues. |
This can be solved by turning |
This won't do much because browsers (at least Chrome) tend to turn I also tried to wrapping the texts in div-Blocks and replacing the line breaks by |
Turns out, it already works if Is that good enough to work with, or do we need more here? |
Hi and thanks for you answer and best wishes for 2020! Maybe I'm doing it wrong but, when I turn htmlLabels to false, I don't get a line breaks but I see the Furthermore, the rendering is a bit messy. |
Hi, I also wish you all the best for 2020 :) Thank you for posting the example, and pardon me, I forgot to say that I tried this on a yet unreleased state of the flowchart renderer which will be included in an upcoming release. I built from the develop branch of the mermaid repository, which produces the following output for your example graph (used another color theme though): Edit: updated the image |
The issues with style classes which you mentioned (for example in node ".fic1") may be connected to issue #487 as there is currently no support to change the text color by mermaid style classes, and setting |
Thanks for those informations. I will check when the new version will be available. |
At the moment multiline texts are not centered if html labels are disabled. Thanks for pointing that out, I have opened a new issue to get the texts centered for non-html labels as well: #1177 |
Hi @etimau, feel free to ask if you need further information on this topic. |
I think we can close this issue, feel free to open a new one if you run into problems. |
When using
<br>
in a sequenceDiagram, when exported to SVG, it is translated to<text></text>
tags.See this example
Is it possible to have the same behavior in flowcharts?
If you try this and click on "Download SVG", the result has a parse XML error because of the
<br>
tag.Idem if the
<br>
is inside of a node.The text was updated successfully, but these errors were encountered: