Include external js libraries in webapps

Hugo31
Level 1
Include external js libraries in webapps

Hi all,

I would like to include an external plugin (say jquery tablesorter for instance) in a webapp without accessing it with a CDN link. 

I have no access to the local/static repository, I would like to rely on project libraries only.

I guess I should copy/paste the content of the tablesorter.min.js (mottie.github.io/tablesorter/dist/js/jquery.tablesorter.min.js) into a project library file, and reference this script in the javascript code, but I can't figure out how.

Can you please provide me with some guidance or any other idea? 

Thank you,

0 Kudos
2 Replies
AlexT
Dataiker

Hi @Hugo31,
Indeed if you don't want to use the the CDN link you can use use static resources in Webapp.
As mentioned here you can add the contents of jquery.tablesorter.min.js to the 

Screenshot 2023-11-20 at 1.34.58 PM.png

More details explained in :

https://community.dataiku.com/t5/Using-Dataiku/Interact-with-Static-Web-Resources-Global-Shared-Code...


0 Kudos
Hugo31
Level 1
Author

Thank you for your response,

The issue is I do not have the rights to write global shared code (Not Authorized: Action forbidden). Is there a way to do it using only project libraries ?  

0 Kudos