Step 2 - using b64 data for mermaid content

see https://discourse.nodered.org/t/node-red-mermaid-rendering-is-off-by-one/97546 for details
This commit is contained in:
Gerrit Riessen
2025-06-11 10:17:18 +02:00
committed by GitHub
parent 36afe1ebd0
commit 558ea9d45e

View File

@@ -44,7 +44,7 @@ RED.editor.mermaid = (function () {
nodes.forEach(async node => {
if (!node.getAttribute('mermaid-processed')) {
const mermaidContent = node.innerText
const mermaidContent = atob($(node).data('c64'))
node.setAttribute('mermaid-processed', true)
try {
const { svg } = await mermaid.render('mermaid-render-'+Date.now()+'-'+(diagramIds++), mermaidContent);