# Suggestion: "Download text"

**URL:** <https://talk.observablehq.com/t/suggestion-download-text/1989>\
**Category:** Uncategorized\
**Created:** [May 19, 2019, 11:39pm UTC](https://talk.observablehq.com/t/suggestion-download-text/1989 "2019-05-19T23:39:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![yurivish](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/yurivish/32/198_2.png) [@yurivish](https://talk.observablehq.com/u/yurivish)\
**Post date:** [May 19, 2019, 11:39pm UTC](https://talk.observablehq.com/t/suggestion-download-text/1989/1 "2019-05-19T23:39:49Z")

</div>

The download JSON and PNG options are awesome and incredibly useful! It would be nice if there were an option to download string cells as text — my use case right now is to feed an external tool expecting a string, which I have generated in an Observable cell.

Cheers!

---

<div class="post-metadata">

**Author:** ![mbostock](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mbostock/32/9_2.png) [@mbostock](https://talk.observablehq.com/u/mbostock)\
**Post date:** [May 20, 2019, 12:39am UTC](https://talk.observablehq.com/t/suggestion-download-text/1989/2 "2019-05-20T00:39:17Z")

</div>

If you put square brackets around your string (`["hello world"]`), you’ll get the option to download it as JSON. Otherwise, you could use [DOM.download](https://github.com/observablehq/stdlib/blob/master/README.md#DOM_download):

```auto
DOM.download(new Blob(["hello world"], {type: "text/plain"}))

```

Edit: Added an example of DOM.download.

---

<div class="post-metadata">

**Author:** ![yurivish](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/yurivish/32/198_2.png) [@yurivish](https://talk.observablehq.com/u/yurivish)\
**Post date:** [May 20, 2019, 1:07am UTC](https://talk.observablehq.com/t/suggestion-download-text/1989/3 "2019-05-20T01:07:08Z")

</div>

Thanks for the suggestions. As always, anything is possible in an Observable notebook.

My thinking was that this might be a common enough use case to warrant inclusion in the product interface, similar to the SVG and JSON export options. Of course, it may be strange to see it for shorter strings, and maybe it’s not a common enough need for most users to earn a spot in the menu.

---

<div class="post-metadata">

**Author:** ![mbostock](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mbostock/32/9_2.png) [@mbostock](https://talk.observablehq.com/u/mbostock)\
**Post date:** [May 20, 2019, 1:41am UTC](https://talk.observablehq.com/t/suggestion-download-text/1989/4 "2019-05-20T01:41:20Z")

</div>

Yes, that’s a reasonable suggestion. Thanks!

---

<div class="post-metadata">

**Author:** ![mbostock](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mbostock/32/9_2.png) [@mbostock](https://talk.observablehq.com/u/mbostock)\
**Post date:** [May 20, 2019, 9:34pm UTC](https://talk.observablehq.com/t/suggestion-download-text/1989/5 "2019-05-20T21:34:00Z")

</div>

The requested feature is now available: you can **Download text** on any cell whose value is a string. Thanks for the suggestion!

---

<div class="post-metadata">

**Author:** ![yurivish](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/yurivish/32/198_2.png) [@yurivish](https://talk.observablehq.com/u/yurivish)\
**Post date:** [May 20, 2019, 9:49pm UTC](https://talk.observablehq.com/t/suggestion-download-text/1989/6 "2019-05-20T21:49:47Z")

</div>

Truly fantastic. Thank you, Mike!
