Copy and paste the GoogleDocs2Html code into the script editor.Go to the Tools menu, select "Script editor.".To use this wonderful script, open, import or create a document in Google Docs, and follow these instructions: Configuring GoogleDoc2Html It is not perfect, but there are no classes, no extra spans or divs. Here is the same file exported using the GoogleDoc2Html script: Here's a screenshot of the export of a document created in Google Docs, exported as HTML, and opened in HTMLTidy run in Sublime Text: Even with documents created with Google docs, and exported as HTML, I still have to go it and remove things like class="c0 c1" on paragraph and list items, along with a bunch of tags added throughout. You can upload your document to Google Drive, and open/convert it with Google Docs, or create a new one. Using Google Docs and the Google Docs Script Editor, this script emails a pretty simple HTML file of the document to your Google email account associated with your Google account. My searching for a better way has led me to a great script called GoogleDoc2Html created by Omar AL Zabir. My desire is to have simple HTML, that will pick up the styling of my Drupal or Wordpress theme. I figured out that I spend most of my time stripping out what Microsoft Word, OpenOffice, and Google Docs put in there.
Cleaning up the HTML of those documents is always a chore, no matter who puts them together. We are often tasked with entering content into the CMS' we build for our clients. Clean Up Google Docs' HTML Programmatically