I'm using C++ to develop a plugin for InDesign. During development, I want to catch the events of text changes within document opened in InDesign. The events are something like adding or deleting some characters or words or phrases from the document. Those can be understand as events occurred when user edit or delete text from the document.
When the events are detected, they should provide what characters, words, or phrases are added or deleted from the document. Also, they should provide the index of text changes if they are able to do that.
Please help me with this issue by providing some methods, functions, or libraries that can detect text changes in InDesign.