Hi,
A project I'm working on is using the node-red editor as some sort of interface to the main system. For that, I'm looking for a way to both configure the editor itself and watch (hook) when something happens.
I vaguely remember reading here about a way to configure which settings appear under the "Deploy" button, for example, or to hook when a user has pressed the "Deploy" button (i.e. calling my own function, sort of "OnDeploy()").
A couple of examples of my needs would be:
- When a user pressed "deploy", my function would be called. It would get the current flow, modify some nodes, and writes them back. Only then would the actual Deploy functionally would be invoked (either explicitly via my function, or implicitly at the end of my function).
- A similar functionality, yet triggered when a user has added a node from the palette into the workspace.
I've looked at the API's runtime hooks, yet I'm not sure if I'm in the right place. If I understand correctly, those hooks pertain to the runtime functionality of the flow, yet not during editing time?
Another place I looked at was the storage API, after reading this post. I'm not sure if this would fit my needs as well.
Am I looking in the right place/s? Is this functionality even possible, without modifying node-red's core code?
Thank you.