Skip to content

Are inline themes supported? #4

Closed Answered by MikaBerglund
joshkempner asked this question in Q&A
Discussion options

You must be logged in to vote

OK, so I got the problem reproduced with your PR. Thanks again. That was actually quite an interesting bug. It might even be a bug in Mermaid itself, but I haven't yet tried to reproduce the bug with standard HTML and JS.

Anyway, this is now fixed. What I did was that the JavaScript component in Blazorade Mermaid keeps track of how many times it has rendered a diagram. If no diagrams have been rendered, it adds a temporary simple diagram without inline themes to the DOM, renders that, and them removes it from the DOM. You can't even see that it is added and removed.

This workaround seems to work with all of the different cases I tried. Also the changes that you sent in your PR are fixed.

I…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
6 replies
@joshkempner
Comment options

@MikaBerglund
Comment options

@MikaBerglund
Comment options

@MikaBerglund
Comment options

@joshkempner
Comment options

Comment options

You must be logged in to vote
1 reply
@joshkempner
Comment options

Answer selected by joshkempner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants