I am trying to use dropzone.js (https://dropzonejs.com) in a panel app, but I cannot get the script to load either in the jupyter notebook or using pn.serve.
The dropzone element will show fine in a HTML pane and the css is loading, but the script is not working.
I have tried looking into the solution discussed at Adding local .js files to my app, but to no avail.
Is there any guide how to use external or local js in panel apps anywhere? Or does anyone know what I am doing wrong? (panel.holoviz.org/user_guide/Deploy_and_Export.html mentions it very briefly)
The html works fine if saved as foo.html and opened in firefox/chrome
My minimal example:
import panel as pn pn.extension() html = """ <body> <script src="https://rawgit.com/enyo/dropzone/master/dist/dropzone.js"></script> <link rel="stylesheet" href="https://rawgit.com/enyo/dropzone/master/dist/dropzone.css"> <p> Text </p> <!-- Change /upload-target to your upload address --> <form action="/upload" class="dropzone dz-clickable" style="width:500px;text-align: center;"> <div class="dz-default dz-message"> <span>text</span> </div> </form> <input type="file" multiple="multiple" class="dz-hidden-input" style="visibility: hidden; position: absolute; top: 0px; left: 0px; height: 0px; width: 0px;"> </body> """ pn_html = pn.pane.HTML(html) server_i = pn.serve(pn_html, websocket_origin='*', port=9000, verbose=True, websocket_max_message_size = 200000000)