Hello,
You are referring to Docs Editor, right?
You can use this Command Service method to save the current version of the edited document without closing it: Command service - ONLYOFFICE Api Documentation. You can link function sending the forcesave request to your custom button. Here you can learn more about the logic of forcesave: Saving File - ONLYOFFICE Api Documentation. You can monitor the status 6 message sent to the callback and add your own events that would be triggered each time the saving occurs.
But placing the button outside Editor frame would require Automation API: Automation API - ONLYOFFICE Api Documentation