Drive Notepadby DM

View and edit your Google Drive™ files in your browser.


The app is hosted free on github, and Google Drive API requests are also fulfilled for free. This means it costs nothing to keep the app up and running, and hence it can be provided to users for free. Yay!

The editor itself is an instance of the ace.js poject (including the css). The file history viewer uses jsdifflib for diffing (the diff-chaining and UI are custom built). The menu icons are from modernuiicons.com. the shake animation is from daneden.me, all other CSS is custom "designed". JavaScript keybinding use keymaster.js.

News

Mar 2016. Drive Notepad has moved from appspot.com to github.io. It has also undergone a major refresh. The new version should have improved stability, speed and useability, however for the first few days there may be some issues that need resolving. As always, please provide feedback in the Google+ community.

Aug 2015. !!!! IMPORTANT !!!! After August 2016 you will no longer be able to use Google Drive as a simple web-server for HTML/JS/CSS/images etc (see this Google blog post). Your files will not disappear from your Google Drive - you will still be able to access them via the usual web interface and/or desktop sync program, and you will still be able to open them with Drive Notepad (or other similar 3rd party apps), however you will no longer be able to use Google Drive + Drive Notepad as a means of quickly building publicly visible websites. In terms of replacements, there may not be anything quite as easy/free/simple out there, but there are a large number of alternatives with varying strengths. One option is to create a repository with a gh-pages branch on github and then access it at your_username.github.io/your_repository_name. This is how drivenotepad itself is now being served (although it is a github "organisation" rather than a user). If you know of a better alternative please comment on the Google+ version of this announcement for others to see.

FAQ

How do I uninstall Drive Notepad? It is not enough to uninstall the Chrome Webstore app, you need to remove Drive Notepad from your Google Drive account - see Google's instruction here.

How do I log out of Drive Notepad? If you are logged in to your Google account you will have access to Drive Notepad. Logging out of your Google account will log you out of Drive Notepad in so far as you will not be able to open new pages with Drive Notepad. However, to fully log out you you must close all Drive Notepad tabs in your browser. If you want to prevent Drive Notepad from ever being able to access your files again then see here.

It doesn't work! Huh?! There are many web browsers and operating systems in existence, but only a very limited number have been used during testing, and fewer still were found to give the fully correct experience. If possible, use Google Chrome. If that's not an option, try Firefox or Microsof's Edge browser. If you really are restricted to some other browser, then unfortunately it is unlikely that Drive Notepad will work for you, but please post in the Google+ community to see whether there is anything that can be done. Sometime the problem is not with the browser but with a virus, popup/ad blocker or extension. To test this, try opening your browser with extensions disabled ("incognito" mode in Chrome), and try it on a separate computer. If the problem persists please report it in the Google+ community.

My non-English characters are mangled. This is a highly confusing topic, the story goes like this: in Unicode there are thousands of characters, each with its own unique ID called a "code point". When writing text on a computer you can choose to use the unicode IDs (we'll come back to this in a moment) or you can choose to use something else entirely. If you go with the "something else entirely" option, then you may get lucky and find that the IDs in your alternative system line up roughly speaking with the IDs in unicode, which is the case for Windows-1252, but in general the IDs in your special system will have no particular correspondence to IDs in unicode.

So, back to unicode: although every character has a unique "ID" (or "code point"), there are several ways you can choose to write it down. One option is to simply spell out all 32bits for each character (since IDs are at most 32 bits long), this is called UTF-32. Although this is a possibility, it's rather wasteful because it's rare to use IDs with high values. Another option is to use 16bits most of the time, and have a special code to allow expansion to 32bits on individual rare occasions. This means the total size of the text is now smaller, however it introduces compelixities for programmers as there is now no fixed correspondence between the size of a string in bytes and its length in characters. In fact, once you start with these compelxities you could choose to go down to 8 bits, with occasional expansion to 16 or more bits. Not surprisingly, these schemes are known as UTF-16 and UTF-8. One final thing to note is that the 32bits in UTF-32 are formed of 4 bytes, and those bytes can be ordered in memory in either little or big "endian" form (and similarly for the two bytes of UTF-16). Usually, files encoded with UTF16 or UTF32 will begin with a special "Byte Order Mark" (BOM) which states unambiguously which order the bytes appear within each unit. Sometimes there is a BOM included in UTF8 as well, although this is redundant as UTF8 is composed of one-byte units.*

So, why then are your characters mangled by Drive Notepad? Well, the application aims to support UTF8 and UTF16 (both little and big endian), but it does not support UTF32 or other non-unicode encodings. If you know your file is encoded with UTF8 or UTF16 but it's not rendered correctly by Drive Notepad then please post in the Google+ Community, and ideally provide a sample file and note your operating system and browser. If you think that the application should support other encodings then please also use the Google+ community to explain why. Note that files are saved in UTF-8 format.

*This is actually not quite the end of the story, though things get a bit hazzier now...JavaScript uses unicode IDs, with 16bit units, but it doesn't strictly speaking implement UTF-16. Instead, for IDs larger than 16bits, it spuriously separates the two halves into two seemingly separate characters. And then there's atob and btoa which work only on 8-bit characters, turning a 3-tuple of 8-bit characters into a 4-tuple of 6-bit characters (and back again). That gets used internally by the google client library.

Well, you get the idea: putting words on a page can sometimes turn out to be rather complicated.

Can I hide line numbers and/or change other configuration of ace? Most of the settings you are likely to want to change are shown in the settings tab of the widget. And any changes you make there will be remembered across visits to Drive Notepad. However, the editor, which is an open source project called ace has a "secret" settings menu built in which provides some additional options. Use the keyboard shortcut Ctrl/Cmd-, (that's a comma) to access the menu. These extra settings will not be remembered across visits to Drive Notepad, and may possibly interfere with the working of the application (though in most cases that is unlikely). If you really want a particular setting to be "upgraded", i.e. to be fully supported, then please post in the Google+ community.

Can I access/modify my document programatically? [Advanced Users] Although Drive Notepad doesn't "officially" support interfering with the editor/document programatically, you can in fact do so fairly easily. Open your dev console and type dn.editor. That's the main instance of ace that you see in the page. To read the document use dn.editor.session.getValue() and to set it use dn.editor.session.setValue(some_value). You can also use all the other methods described in the ace API reference. Note, however, that some actions may interfere with the running of the applciation in unexpected ways, so be careful! If you find yourself using the command line often, then please consider posting in the Google+ community, describing what it is you're doing. It might be of interest to other users and could perhaps inspire a new feature for the app. It might also be worth mentioning that the source for Drive Notepad itself is available on github.

How secure is Drive Notepad? DM is not a specialist in security, but Drive Notepad is likely to be reasonably secure as it only consists of the code running in your browser, i.e. there is no customized backend server or database with users' information. The application is served from github, and API requests are made directly to Google, using Google's own JavaScript library. Your personal settings are stored in your Google Drive. See below for privacy policy regarding Google Analytics.

Can I go back to a previous version of a file? Yes. Yes, you can. Version control is very much part of Google Drive, and Drive Notepad in theory should never mess this up. See Google's help here. Drive Notepad now has a tool built in that lets you view the history of a file in an interactive way - click the history button in the file tab or use the shorcut ctrl-H. Be gentle with the history tool as it's still under development and may still have the odd bug (it won't mess up your file but it might not yet show you what you need)!

Why have ads?

Note that currently ads are disabled. It takes time and effort to make and maintain a web app, and ad revenue supports and encourages the developer to invest time in doing so. The ads in Drive Notepad are hand picked from cj.com, which runs what is known as an "affiliate program". Income is generated not when a users clicks on an ad, but if and when the user actually engages with the advertiser's business in some way, which generally means purchasing a product (and not returning it!). The ads in Drive Notepad appear on the right-hand side of the page roughly every 15 minutes, disapearing automatically after about 1 minute, or when the user clicks 'close'. It is hoped that this level of advertising will be sufficiently discrete so as to not distract from working on documents within the application. Note that you can set a narrow word wrap width in the settings tab if you don't want ads to cover up your content. If you want to express an opinion on this matter then please post in the Google+ Community. Note that there is currently no plan to have a paid-for ad-free version of the application.

Privacy Policy

This website uses Google Analytics to help Analyse how users use the site. The tool uses "cookies," which are text files placed on your computer, to collect standard Internet log information and visitor behavior information in an anonymous form. The information generated by the cookie about your use of the website (including IP address) is transmitted to Google. This information is then used by the developer to evaluate visitors' use of the website and to compile statistical reports on website activity.

Drive Notepad will never (and will not allow any third party to) use the statistical analytics tool to track or to collect any Personally Identifiable Information (PII) of visitors to the site. Google will not associate your IP address with any other data held by Google. Neither Drive Notepad nor Google will link, or seek to link, an IP address with the identity of a computer user. Drive Notepad will not associate any data gathered from this site with any Personally Identifiable Information from any source.

You may choose to accept or decline cookies. Most Web browsers automatically default to accept them, but you can usually modify your browser setting to decline cookies. If you decline cookies by changing your browser settings then Drive Notepad willl no longer be able to function because the communication with Google Drive relies on cookies.