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
pull/5167/head
Gerrit Riessen 2025-06-11 10:17:18 +02:00 committed by GitHub
parent 36afe1ebd0
commit 558ea9d45e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

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);