External JS Libraries inside a Node's UI?


Is there anything that technically prevents someone from using a custom JS library like this one while building a custom Node's edit interface?

No, nothing preventing you using jQuery plugins like the query builder one.

You would need to either use a CDN (would require the user to have internet access to configure your nodes settings) OR add the lib as a resource to your node (i.e. present it to the node editor via an admin endpoint)

Thanks! I will try the 2nd route to make it self-sufficient without the internet.

P.S. I hope this is the solution you were proposing: Loading extra resources in the editor : Node-RED

1 Like


That is correct.

  1. have a folder named resources in your modules root directory

  2. reference it in your HTML file

    <script type="text/javascript" src="resources/<your-module-name>/magic.js"></script>

I have many files in my resources folder, they can also have sub folders
ļ»æ<script type="text/javascript" src="resources/<your-module-name>/more/magic.js"></script>

1 Like

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