Closed alexwkleung closed 6 months ago
Hmm, I don't think this works how I imagined it. Will need to further investigate once I work on it later on.
Looking at the type definitions and the documentation briefly, it doesn't seem like mermaid exposes a "destroy initializer" function so I probably have to create a workaround I guess.
From limited testing, you can force mermaid to reinitialize via the following:This should be sufficient for changing the mermaid theme from light to dark and vice versa. Performance wise I don't know of a better way toreinitialize mermaid (old API is exported but it's commented out in source code from what I remember).