forked from thejimbirch/GoogleDoc2Html
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c955445
commit 9157c63
Showing
1 changed file
with
4 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |