Example Node-RED that adds a sidebar panel in the editor
-
git clone this gist somewhere
-
In
~/.node-red
run:npm install <path to where the gist is>
-
Restart Node-RED
-
Reload the editor and marvel at the new sidebar tab
{ | |
"name": "node-red-plugin-template", | |
"version": "1.0.0", | |
"description": "An example plugin that adds a new sidebar to the editor", | |
"keywords": [], | |
"author": "", | |
"license": "Apache-2.0", | |
"node-red": { | |
"plugins": { | |
"sidebar-plugin": "sidebar-plugin.html" | |
} | |
} | |
} |
Do you mean you want it to be the tab shown by default when the editor is opened?
Correct!
You cannot force a particular tab to the front - it's up the user what order the tabs are in.
You can trigger the sidebar to show your tab with RED.sidebar.show("example-sidebar")
- but you shouldn't really use that to force yours to the front when the editor is loaded.
Hello, how could I add info to a variable from side bar?
I want to create a sidebar that will display a iframe only if the user added a url in the input on the top of the side bar.
Can you explain what you mean by 'display on startup' ? Do you mean you want it to be the tab shown by default when the editor is opened? Or do you mean something else?