Hello, i'm stuck on something.
When editing a node in the edit dialog, i want the "user" to be able to select an item from a list stored in the global context.
I already create an http endpoint, then when we open the edit dialog tab, it requests the runtime for values.
html file
oneditprepare : function(){
$.getJSON('listStored',function(data) {
$("#node-input-list").typedInput({
types: [
{
value: "list",
options: [
{ value: "", label: "--Select an item--"},
...data
]
}
]
})
});
}
js file
RED.httpAdmin.get("/listStored", RED.auth.needsPermission('node.read'), function(req,res) {
let listFromGlobal = //How to access global context from here
res.json(listFromGlobal);
});
But from here how to access the global context ?
I looked at the documentation on RED module butunderstand how to use it