Skip to content

Configure security level on mermaid to enable anchor links #3812

Answered by squidfunk
falondarville asked this question in Q&A
Discussion options

You must be logged in to vote

It's not possible to configure Mermaid.js via mkdocs.yml, which is initialized here:

tap(() => mermaid.initialize({
startOnLoad: false,
themeCSS
})),

I'm not keen on adding more and more configuration options, since this would make things really complicated and error prone. However, we could add the configuration option you mentioned as a default, since MkDocs is a static site generator, so what's going into the site is decided at build time and not by user interaction. Thus, allowing the author to bind click events should be totally fine.

PR appreciated.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by falondarville
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