Drft uses a number of methods and standard compliant features for making sure your writing is safe.
The first line of defense for your writing is versioning and autosaving. Anytime you are working in a document, after you stop typing for more than 4 seconds, your document is automatically saved. There is also a manual save option located in the toolbar within the document. Also, after 60 seconds a version of your document is saved separately, and subsequently every 10 minutes after that, a new version is created. In the event of you accidentally clearing a document and Drft autosaving over it, just go back to "Saved" > "Versions" and you can easily restore a previously created version.