I am creating a select tag in the editor and I want to display the list of all timezones using moment-timezone package
Is there any way I can use an external package in my editor?
If yes, then how do I need to import it inside oneditprepare function?
You can create an endpoint in the js and call it from your html
Alternatively you can place a static file (JSON) in a resources directory
https://nodered.org/docs/creating-nodes/resources
Is this how we need to write the endpoint?
RED.httpAdmin.get(
"/serialports",
RED.auth.needsPermission("serial.read"),
function (req, res) {
}
);
But I am not sure how I need to add my code there.
Can you please share a resource about creating endpoints and connecting them in html.
You know that Node.js has full support for the INTL standard JavaScript library right? It is very comprehensive and, unlike moment, still in active development.
system
Closed
26 February 2023 12:53
5
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.