mirror of
https://github.com/node-red/node-red.git
synced 2025-12-27 23:34:38 +01:00
Merge branch 'master' into dev
This commit is contained in:
@@ -1017,6 +1017,7 @@ RED.editor = (function() {
|
||||
|
||||
function showEditDialog(node, defaultTab) {
|
||||
if (buildingEditDialog) { return }
|
||||
if (editStack.includes(node)) { return }
|
||||
buildingEditDialog = true;
|
||||
if (node.z && RED.workspaces.isLocked(node.z)) { return }
|
||||
var editing_node = node;
|
||||
@@ -1334,6 +1335,7 @@ RED.editor = (function() {
|
||||
var editing_config_node = RED.nodes.node(id);
|
||||
var activeEditPanes = [];
|
||||
|
||||
if (editStack.includes(editing_config_node)) { return }
|
||||
if (editing_config_node && editing_config_node.z && RED.workspaces.isLocked(editing_config_node.z)) { return }
|
||||
|
||||
var configNodeScope = ""; // default to global
|
||||
@@ -1777,6 +1779,7 @@ RED.editor = (function() {
|
||||
|
||||
function showEditSubflowDialog(subflow, defaultTab) {
|
||||
if (buildingEditDialog) { return }
|
||||
if (editStack.includes(subflow)) { return }
|
||||
buildingEditDialog = true;
|
||||
|
||||
editStack.push(subflow);
|
||||
@@ -1993,6 +1996,7 @@ RED.editor = (function() {
|
||||
|
||||
function showEditGroupDialog(group, defaultTab) {
|
||||
if (buildingEditDialog) { return }
|
||||
if (editStack.includes(group)) { return }
|
||||
buildingEditDialog = true;
|
||||
if (group.z && RED.workspaces.isLocked(group.z)) { return }
|
||||
var editing_node = group;
|
||||
@@ -2107,6 +2111,7 @@ RED.editor = (function() {
|
||||
|
||||
function showEditFlowDialog(workspace, defaultTab) {
|
||||
if (buildingEditDialog) { return }
|
||||
if (editStack.includes(workspace)) { return }
|
||||
buildingEditDialog = true;
|
||||
var activeEditPanes = [];
|
||||
RED.view.state(RED.state.EDITING);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -101,7 +101,7 @@ RED.utils = (function() {
|
||||
|
||||
renderer.code = function (code, lang) {
|
||||
if(lang === "mermaid") {
|
||||
return `<pre class='mermaid'>${code}</pre>`;
|
||||
return `<pre style='word-break: unset;' data-c64='${btoa(code)}' class='mermaid'>${code}</pre>`;
|
||||
} else {
|
||||
return "<pre><code>" +code +"</code></pre>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user