Goal: Create a installable trigger in App Script for Google Docs which fires when the eventType onEdit is done. (So the trigger listens for the onEdit event and when triggered it calls another function which does X when the user deletes or adds a paragraph)
Background: Google Sheets has an onEdit simple trigger, and the eventType on_edit. The eventType onEdit only supports Google Sheets. Regarding Google Docs the EventTypes and triggerBuilder methods for Google Docs (according to the docs) are only onOpen and Create.
I'm fairly new to App Script so I'm hoping someone knows a hack to get around the fact that the triggerBuilder only supports two methods.
The only available trigger for Google Docs is onOpen()
.
A solution would be to monitor if the last changed timestamp changes with a trigger for instance like so
DriveApp.getFileById('gdoc id').getLastUpdated()