How to list all timezones in editor using moment-timezone

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

Is this how we need to write the endpoint?

    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.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.