Installation
Insert the
loadExternalFilesfunction into your Knack app's JavaScript editor:function loadExternalFiles(files) { KnackInitAsync = function ($, callback) { Knack.showSpinner(); window.$ = window.jQuery = $; let loaded = 0; files.forEach(file => { el.onerror = () => { alert(`Error loading ${file.url}. Please refresh and try again.`); Knack.hideSpinner(); }; document.head.appendChild(el); }); }; }Insert the function call code at the top of your code, adjusting the array items to suit the library(s) that you want to import.
loadExternalFiles ([ { type: 'script',module: false,url: ''}, { type: 'link', module: false, url: ''}, ])
