Google Drive POSHDOC App

Introduction

Since about 2009 Google decided to disallow publishing or viewing HTML files on Google drive - that is understandable, because any JavaScript inside a HTML file would be executed with the permissions of the user who is viewing them. If you try to preview a HTML file on Google Drive you will see the plain HTML source code.

The Google Drive POSHDOC app is built with Google Apps Script and uses the Drive REST API to open and save HTML files.

When opening a HTML file it is poshified, provided with a preconfigured style sheet and displayed. The app allows to switch to edit mode and to save the changes back to the original file on Google Drive.

Development

A first step could be to implement just a HTML file viewer, using any of the HTML sanitizing JavaScript libraries out there to strip dangerous content.

In a second step the editor can be implemented, probably using CKEditor.

After this, the sanitizer is replaced with a proper JavaScript poshifier and the editor with a POSHDOC editor. Synergies with the The Poshy Editor project should be abundant.