How to get doc content on every change?

Hello @lovefrompal,

Unfortunately, at the moment it is possible only in the plugin. If you initialize the plugin with

"initDataType": "html",
"initOnSelectionChanged": true,

https://api.onlyoffice.com/docs/plugin-and-macros/structure/manifest/#variationsinitdatatype
you will receive selected parts of the document in html format in the init event.
https://api.onlyoffice.com/docs/plugin-and-macros/interacting-with-editors/methods/common-api/plugin/init/

We are planning to add the required method to the Automation API in Document Server 8.3 (~1 month).