feat(markdown): add hover download buttons on rendered SVGs
Attach SVG and PNG (×2) download buttons to every rendered SVG (TikZ, Mermaid, …) once post-render finishes. Exports always use the original colors with a white background baked in, regardless of theme.
This commit is contained in:
@@ -174,7 +174,7 @@ export const useShikiji = (): Promise<void> => {
|
||||
|
||||
let mermaidInitialized = false
|
||||
|
||||
export const runMermaid = (querySelector: string) => {
|
||||
export const runMermaid = (querySelector: string): Promise<void> => {
|
||||
if (!mermaidInitialized) {
|
||||
mermaidInitialized = true
|
||||
mermaid.initialize({
|
||||
@@ -184,7 +184,7 @@ export const runMermaid = (querySelector: string) => {
|
||||
})
|
||||
}
|
||||
|
||||
mermaid.run({
|
||||
return mermaid.run({
|
||||
querySelector
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user