0

I am trying to make a web app that whenever called(in my case an ajax request), will return a text output containing the doc in the html form.

I have tried GoogleDoc2HTML but it has problem with formatting ordered lists.

The Docs to Markdown add-on provided a correct version of the html.

I have also tried to download the HTML and write a converter myself. Although the lists are working, I don't know how to process the styles(bold, italic...) as those were generated as css included in the header by google doc.

Is there a way to convert a doc to html with a similar format as those produced by the Docs to Markdown add-on? Or is there a way to access the output of the add-on in google app script?

daniel chen
  • 23
  • 1
  • 4

2 Answers2

2

I went through atleast 10 questions on the same topics and I couldn't find any solutions. And finally, here I see a small comment which says "If you remove /edit and append /export?format=html, You'll get html" . Literally that's how easy it is. All credit to TheMaster

-1

Separated files can be included back into the main HTML page using template statements such as

<?!= include(myCSS); ?>

What you want to accomplish is describe in the documentation here:

https://developers.google.com/apps-script/guides/html/best-practices#separate_html_css_and_javascript

General Grievance
  • 4,555
  • 31
  • 31
  • 45