ONLYOFFICE / document-editor-react

React component for ONLYOFFICE Document Server
Apache License 2.0
34 stars 7 forks source link

How to use "events_onRequestHistory" #17

Closed likedream11 closed 1 year ago

likedream11 commented 1 year ago

I can't use this, "var onRequestHistory = function() { docEditor.refreshHistory({ "currentVersion": 2, "history": [ { "created": "2010-07-06 10:13 AM", "key": "af86C7e71Ca8", "user": { "id": "F89d8069ba2b", "name": "Kate Cage" }, "version": 1 }, { "created": "2010-07-07 3:46 PM", "key": "Khirz6zTPdfd7", "user": { "id": "78e1e841", "name": "John Smith" }, "version": 2 }, ... ] }); };"

likedream11 commented 1 year ago

好吧,看完源码后,我用 ''window.DocEditor.instances[id].refreshHistory()' 替换'docEditor.refreshHistory()'后可以运行了