Getting edited document content without closing editor

Integration questions/issues
Post Reply
peterneo
Posts: 4
Joined: Fri Feb 19, 2016 7:06 am

Getting edited document content without closing editor

Post by peterneo » Tue Apr 16, 2019 2:20 pm

Hi Onlyoffice team,

We are working on integration of Document Server into our portal for editing office documents on our pages. We already did most of the work years ago and our integrations work well for our common customers (you know). This time we go further to solve needs of our users - we need clearly make versions of what they (co-)edit in Onlyoffice editors in our repository. Versions should belong to exactly what user had changed last (at least, with high probability).

We have tried to use your JS API's downloadAs() and request a link to the document after an user changed the doc a bit. It would serve the need in non active co-editing, but it has one bad side effect - it shows a popup in the editor (something like "Document downloading..."). Sometime it even may block the editor so need reload the page. A study of the URLs it sends shows that you maintain so named "cache" with identifiers suffixed with incrementing number - nice! Would we get all versions in that cache somehow and users who saved them?

Next, we found Command service feature "forcesave" - sounds like what we would use. Ok, we are on it. But, even with "forcesave" command, how we could take in hands exactly what some user edited in his editor? Looking from an event sourcing point of view, it would be more efficient to provide an URL of the changed content (your cached link) directly in onDocumentStateChange() event (when it's event.data=false). It's in place, it's clearly where user does his changes and integrators would use it from this point knowing a context.

Thank you for help and suggestions.

Carl
Posts: 149
Joined: Thu Apr 12, 2018 10:00 am

Re: Getting edited document content without closing editor

Post by Carl » Fri Apr 19, 2019 7:45 am

Hello,

Perhaps this is what you are looking for:
https://api.onlyoffice.com/editors/history

Post Reply