Closed RuslanGabbasov closed 4 years ago
Hi, you can get a view of this panel using onlyoffice-documentserver-ie
or onlyoffice-documentserver-de
integrated test example:
Also documentation is here: https://api.onlyoffice.com/editors/history
Thank you for helping!
I'll close this issue, feel free to ask any question or create new issue if anything happens )
Hi, @ShockwaveNN ! I have added two callback in configuration file:
var onRequestHistory = function() {
docEditor.refreshHistory({
"currentVersion": 1,
"history": [
{
"created": "2010-07-06 10:13 AM",
"key": "be87eb7ca44e5898964847a717aef440920175e86a34f4a9e78b0aa526d866b8",
"user": {
"id": "52",
"name": "Kate Cage"
},
"version": 1
},
]
});
};
var onRequestHistoryData = function(event) {
var version = event.data;
docEditor.setHistoryData({
"key": "be87eb7ca44e5898964847a717aef440920175e86a34f4a9e78b0aa526d866b8",
"url": "https://example.com/url-to-example-document.docx",
"version": version
})
};
And have added in config:
"onRequestHistory": onRequestHistory,
"onRequestHistoryData": onRequestHistoryData,
But when I click on History button I always get endless spinner:
Browser console is empty, document server log is empty too. What I do wrong?
@RuslanGabbasov Sorry, this is out of my area of knowledge. Maybe @LinneyS can help?
Sorry, it's my mistake. I figured out what was wrong.
@RuslanGabbasov Could you describe your mistake if anyone notice same error?
Of course. In my case in the scope of onRequestHistory function wasn't docEditor object. But the error was caught in your code and didn't was shown.
@RuslanGabbasov Ok, thanks, so if issue resolved - I'll close this issue. Feel free to comment here or create new if something happens
@RuslanGabbasov I am getting same error " loading version history" continuously coming. Could you plz describe what exactly issue was? What does mean scope of onRequestHistory function wasn't docEditor object?
@new-ranger It happened 2 years ago, and I hardly recall what was wrong. In my example just constant docEditor was undefined.
@new-ranger I think you may get some other error with a similar look
I think it's better to create a new issue, check the JS console for error,s and add more info about your environment (os, DMS etc..)
Do you want to request a feature or report a bug? need help
In documentation https://helpcenter.onlyoffice.com/ru/onlyoffice-editors/onlyoffice-document-editor/usageinstructions/viewdocinfo.aspx showed: The panel that displays version and revision history. But we can't find any information describes a configuration of document server that makes it possible. In examples that represented on https://api.onlyoffice.com/editors/try, it doesn't work too.
Please help us. How it works and how we can enable it?