I have been struggling with this for a little over 2 weeks now. Here is our scenario:
We have the document server running for example on server 192.168.214.70 and our software runs on 192.168.214.50, I have even tried to add in an ajax function but then it tries to fire off right away on document load.
I just need to be able to know when the user hits the save button and how I can tie into this. Please it is driving me crazy trying to get this one last thing working.
Hello, status 6 is being sent to the callback handler each time a document is forcesaved, you can observe status 6 messages and link your function to callback getting status 6 - ONLYOFFICE Api Documentation - Callback handler
Hello, I guess I’ve also encountered a similar problem
My business scenario is that users need to click on a custom button in the browser, such as the “Save” button, to control whether to save in Word, rather than automatically saving through OnlyOffice or clicking the save button in OnlyOffice before saving
May I ask how can I use my custom button to call the callback interface for saving documents?
If there are any good methods or suggestions, please guide me. Thank you very much!
You can use this Command Service method to save the current version of the edited document without closing it: ONLYOFFICE Api Documentation - Command service . You can link function sending the forcesave request to your custom button. Here you can learn more about the logic of forcesave: ONLYOFFICE Api Documentation - Saving File
Can you provide an example of the eventlistener that could be added to achieve this? This would be perfect if I knew how to capture the status 6.
Unfortunately, we do not provide such code examples, you have to implement it yourself.