Published
Edited
Oct 11, 2021
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
viewof myInput = Inputs.textarea({placeholder: "Type here", submit: true, label: "Type something, then hit Submit"})
Insert cell
Insert cell
Insert cell
out = {
let blob = new Blob([myInput], {type: 'text/plain'});
const downloadLink = `Click this link to <a href="${URL.createObjectURL(blob)}" download="${fileName}">download</a> the file.`
const out = html`<div class="download">${downloadLink}</div>`;
yield out; // auto updates the HTML when any referenced variable changes, like myInput or fileName.
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more