Speed up development with full-stack environments for every branch.

Learn More

Use Javascript to save Textarea as a txt file

Forked from How to use the jQuery $().ready function.

5192 Runs 23975 Views 11959 Copies

This Project allows you to save (download) the contents of a form field (in this case a textarea) as a file to your computer, by taking advantage of the HTML5 Blob object.

Saved

Saved

ericZollman 2

ericZollman
published 3 years ago

    
      
      

    READ ME:

    This Project allows you to save (download) the contents of a form field (in this case a textarea) as a file to your computer, by taking advantage of the HTML5 Blob object.

    A Blob object represents a file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system. The Blob Object and the File Interface are both a part of the WebAPI

    In my next Project I will be using the File Interface in order to show how to open a text file and load its contents into a textarea...

    Please login/signup to get access to the terminal.

    Your session has timed out.

    Dismiss (the page may not function properly).