Request: Give access to node/flow/global context from the Editor

It seems odd that the only part of Node-RED not able to access node/flow/global context variables are the Editor node configuration panels.

It would be really useful for a node configuration panel to be able to work with the context variables and might potentially be another communications channel between the Node-RED runtime and the Editor.

Is this something being considered or would it be considered as a new feature?

Context is part of the runtime state of flows and isnt typically used when you are editing them. So it depends on the use case for it.

We already have ways for the editor and runtime to communicate, so I'd be wary of adding another that could confuse matters of when to use which.

In reality, there is now a rest API for retrieving context values, as used by the context sidebar. We haven't published the details as a public API yet, although I know some people are already using it.

I can appreciate that. I am thinking about how the front and back ends communicate with respect to configuration and information sharing. The ability to share particularly a node context variable could be really useful in avoiding having to create an additional API as I have done in uibuilder for example. I could likely have avoided several API's by using a node context variable.

Again, I appreciate this. However, I suspect that the use of the context variables is actually easier to understand than having to create custom API's?

That is actually what I was hoping for :grinning:

A node's context only exists once the node has been deployed. So you still have to consider the case of a freshly added node in the editor that has not yet been deployed.

OK, good point.