I am using the google drive api v3 files.export
method to get the text/html
version of a google doc. I noticed that all the currently open comments in the doc also show up in the content as footnotes. I was wondering if there is any way to export the content of the doc without exporting the open comments. I can’t seem to find any options for files.export
that would disable comments. Thanks in advance for any help.
Unfortunately, when Google Docs are exported, there are no methods for directly removing comments. So how about this workaround?
drive.comments.list
.drive.comments.delete
.drive.files.export
.If I misunderstand your question, I'm sorry.
When you will modify HTML using regex, how about a following regex?
<sup><a href="#cmnt\w.+?<\/a><\/sup>|<div style=\"border:1px solid black;margin:5px\">[\w\W]+<\/div>
<sup><a href="#cmnt\w.+?<\/a><\/sup>
is the reference numbers at the upper right.<div style=\"border:1px solid black;margin:5px\">[\w\W]+<\/div>
is the comments at the lower part.When above regex is used for the exported Google Doc, the result is as follows.
If this was not useful for you, I'm sorry.