1

I'm trying to figure out if there's a way to highlight text in colour when it's modified in a Google document. It should simply be coloured if someone changes the text. Is such a thing possible and how do you implement it as a layman?

Thank you for your answer!

Carlo
  • 11
  • 2

1 Answers1

0

Unfortunately the trigger onEdit() only works for Google Spreadsheets

If you want to want to retrieve modifications made in a Google Docs document, there is a rather convoluted workaround I can think of.

  1. Retrieve your revision history with Google Drive API - can be accessed within Apps Script with Advanced Drive Service
  2. Retrieve the revision's exportLinks and download them as text\html . See here for more information
  3. Retrieve the revision test as contents of the exportLinks Url
  4. Pass the revision text to a function to highlight text

Maybe just seeing the revision history (where latest changes will be highlighted) will be sufficient for your purposes.

ziganotschka
  • 25,866
  • 2
  • 16
  • 33