Right now there's a copy-code-to-clipboard button at the bottom right of the artifacts window.
I suggest an additional button to download/save to local disk. Ideally it would try to chose a filename by default (eg. the
of the html).
More details
// something like this should work
const content = //get the artifact content
const filename = prompt("Enter a filename to save as:", `${defaultTitle}.html`);
if (filename) {
const blob = new Blob([content], { type: "text/html" });
const url = URL.createObjectURL(blob);
const link = document.createElement("a");
link.href = url;
link.download = filename;
link.click();
URL.revokeObjectURL(url);
Which components are impacted by your request?
UI
Pictures
No response
Code of Conduct
[X] I agree to follow this project's Code of Conduct
What features would you like to see added?
Right now there's a copy-code-to-clipboard button at the bottom right of the artifacts window. I suggest an additional button to download/save to local disk. Ideally it would try to chose a filename by default (eg. the
More details
// something like this should work
Which components are impacted by your request?
UI
Pictures
No response
Code of Conduct