mirror of
https://github.com/node-red/node-red.git
synced 2025-12-27 07:31:07 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user