Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
na-trium-144 authored Jun 16, 2022
1 parent c955445 commit 9157c63
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
## Google Doc to clean HTML converter ##
This is a fork of [thejimbirch/GoogleDoc2Html](https://github.com/thejimbirch/GoogleDoc2Html)
* Added inline link support from [ezramechaber/GoogleDoc2Html](https://github.com/ezramechaber/GoogleDoc2Html/tree/link-support)
* Sends no email
* Deploy web app that returns the HTML as a response instead of sending email

### Usage
1. Create a new Google Apps Script project on your Google Drive.
* Or, Open your Google Doc and go to Tools menu, select Script Editor. You
should see a new window open with a nice code editor.
1. Create a new Google Apps Script project on your Google Drive.
2. Copy and paste the code from here: [GoogleDocs2Html][1]
3. Create new file and write like this:
```
function myFunction() {
var doc = DocumentApp.openByUrl("https://docs.google.com/document/d/***/edit");
// or, var doc = DocumentApp.getActiveDocument();
var body = doc.getBody();
var html = ConvertGoogleDocToCleanHtml(body);
Logger.log(html);
}
```
4. Save the file and run the script.
6. You will get the HTML output of the Google Doc.
4. Save the file and deploy it.
5. Access https://script.google.com/.../exec?url=(url of your document here) to get the HTML output of the Google Doc.

[1]: https://raw.githubusercontent.com/na-trium-144/GoogleDoc2Html/master/code.js

0 comments on commit 9157c63

Please sign in to comment.