node-red-contrib-markdown-note 1.0.3 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/markdown.html +33 -0
- package/package.json +41 -41
package/markdown.html
CHANGED
|
@@ -109,6 +109,39 @@
|
|
|
109
109
|
}, 100);
|
|
110
110
|
});
|
|
111
111
|
|
|
112
|
+
// Re-render when switching flow tabs
|
|
113
|
+
RED.events.on("workspace:change", function () {
|
|
114
|
+
setTimeout(function () {
|
|
115
|
+
RED.nodes.eachNode(function (node) {
|
|
116
|
+
if (node.type === "note") {
|
|
117
|
+
renderNoteNode(node);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}, 150);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// Render all notes when flows are loaded (initial page load / import)
|
|
124
|
+
RED.events.on("flows:loaded", function () {
|
|
125
|
+
setTimeout(function () {
|
|
126
|
+
RED.nodes.eachNode(function (node) {
|
|
127
|
+
if (node.type === "note") {
|
|
128
|
+
renderNoteNode(node);
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}, 200);
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
// Fallback: render any existing notes after short delay on script load
|
|
135
|
+
setTimeout(function () {
|
|
136
|
+
if (RED.nodes && RED.nodes.eachNode) {
|
|
137
|
+
RED.nodes.eachNode(function (node) {
|
|
138
|
+
if (node.type === "note") {
|
|
139
|
+
renderNoteNode(node);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}, 500);
|
|
144
|
+
|
|
112
145
|
function renderNoteNode(node) {
|
|
113
146
|
var nodeEl = document.getElementById(node.id);
|
|
114
147
|
if (!nodeEl) return;
|
package/package.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "node-red-contrib-markdown-note",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "A Node-RED node for adding rich Markdown notes and annotations to your flows.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"node-red",
|
|
7
|
-
"markdown",
|
|
8
|
-
"note",
|
|
9
|
-
"comment",
|
|
10
|
-
"annotation",
|
|
11
|
-
"documentation"
|
|
12
|
-
],
|
|
13
|
-
"author": "Ted Lanham <Backroads4me@gmail.com>",
|
|
14
|
-
"license": "MIT",
|
|
15
|
-
"homepage": "https://github.com/Backroads4Me/node-red-contrib-markdown-note",
|
|
16
|
-
"bugs": {
|
|
17
|
-
"url": "https://github.com/Backroads4Me/node-red-contrib-markdown-note/issues"
|
|
18
|
-
},
|
|
19
|
-
"main": "markdown.js",
|
|
20
|
-
"files": [
|
|
21
|
-
"markdown.js",
|
|
22
|
-
"markdown.html",
|
|
23
|
-
"package.json",
|
|
24
|
-
"README.md",
|
|
25
|
-
"LICENSE",
|
|
26
|
-
"examples"
|
|
27
|
-
],
|
|
28
|
-
"node-red": {
|
|
29
|
-
"version": ">=3.0.0",
|
|
30
|
-
"nodes": {
|
|
31
|
-
"note": "markdown.js"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"repository": {
|
|
35
|
-
"type": "git",
|
|
36
|
-
"url": "git+https://github.com/Backroads4Me/node-red-contrib-markdown-note.git"
|
|
37
|
-
},
|
|
38
|
-
"engines": {
|
|
39
|
-
"node": ">=14.0.0"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "node-red-contrib-markdown-note",
|
|
3
|
+
"version": "1.0.7",
|
|
4
|
+
"description": "A Node-RED node for adding rich Markdown notes and annotations to your flows.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"node-red",
|
|
7
|
+
"markdown",
|
|
8
|
+
"note",
|
|
9
|
+
"comment",
|
|
10
|
+
"annotation",
|
|
11
|
+
"documentation"
|
|
12
|
+
],
|
|
13
|
+
"author": "Ted Lanham <Backroads4me@gmail.com>",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"homepage": "https://github.com/Backroads4Me/node-red-contrib-markdown-note",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/Backroads4Me/node-red-contrib-markdown-note/issues"
|
|
18
|
+
},
|
|
19
|
+
"main": "markdown.js",
|
|
20
|
+
"files": [
|
|
21
|
+
"markdown.js",
|
|
22
|
+
"markdown.html",
|
|
23
|
+
"package.json",
|
|
24
|
+
"README.md",
|
|
25
|
+
"LICENSE",
|
|
26
|
+
"examples"
|
|
27
|
+
],
|
|
28
|
+
"node-red": {
|
|
29
|
+
"version": ">=3.0.0",
|
|
30
|
+
"nodes": {
|
|
31
|
+
"note": "markdown.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "git+https://github.com/Backroads4Me/node-red-contrib-markdown-note.git"
|
|
37
|
+
},
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=14.0.0"
|
|
40
|
+
}
|
|
41
|
+
}
|