@pumpkinhead helped me with downloading files (I used his code in Pixel Lide) - so here’s this, which might help you as well:
Also, I think you might want a method to make the user download a file. Here’s how to do it:
var blob = new Blob([fileContents], {"type": mimeType});
var url = URL.createObjectURL(blob);
var link = document.createElement("a");
a.download = fileName; //including extension
a.href = url;
a.click();
If you want to export a text file, mimeType should be text/plain. If you want to export a javascript file, mimeType should be text/javascript. If you want to export a JSON, use application/json. If yo…
The value of the textbox can be referred to as the text box’s “value” or the “inputElem.value”
If you’ll want a wick file example, just lemme know