Editor now saves edited text.
Now beforeunload calls storeText rather than keydown
Changed a few things for consistency.
Fixed storeText
Merge pull request #61 from deannah/StoreEditText

Note contents in editor are saved when window is closed.