The modern notepad for writers, bloggers and journalists. Supports offline access and instant synchronization with your own server.
For comments and suggestions, please visit this blog post.
Download
Fork it on GitHub: github.com/kasparsd/HTML5-Notepad-with-Sync
- html5-notepad-2011.zip (version 0.2, February 12, 2012)
- html5-notepad.zip (version 0.1, May 26, 2011)
- and a sample Chrome extension sample-chrome-extension.zip
Installation
- Upload files to your server. Somewhere like
http://myname.com/notepad/
- Change the name of
entries
folder to something random - Make that folder writable by the PHP (
chmod 755
orchmod 777
) - Edit
sync.php
and specify the newDATA_DIR
(the one you just renamed) - Change also the username and password to something unique
Screenshots
Version 0.2 (2012)
Version 0.1 (2011)
How Does it Work
The app consists of the following:
- One HTML file with enabled offline access (cache manifest).
- jQuery for all the Javascript and AJAX magic.
- One PHP file with HTTP authentication for syncing with the server.
The files are stored in browser’s localStorage
as key/value pairs with a unique timestamp ID as key and JSON formated content as value. An index of all files and their version timestamps is kept and used for synchronization during which all the content of localStorage
is sent to sync.php
in a POST request. The server reads its own index file and determines which new or edited entries need to be stored and which returned to the browser. All entries are stored on the server as JSON strings in simple text files.
1 Comment