Fetch a Google Docs document as formatted, inlineable HTML.
npm install google-docs-fetch* Preserves (inline) document formatting, including bold/italics, colors, and more
* Strips page width to reflow text into your own container
* Maintains original URLs and uploaded images
npm install google-docs-fetchYOUR-DOC-ID) from the generated link:https://docs.google.com/document/d/YOUR-DOC-ID/edit?usp=sharing
In your script, you can then retrieve the contents of the document as HTML:
``js
var fetch = require('google-docs-fetch');
fetch('YOUR-DOC-ID', function (err, content) {
if (!err) {
console.log(content);
}
});
`
The resulting HTML will resemble the following format, using a wrapper class to scope CSS styles:
``html