First of all, please note that the event name is events_onAppReady, not events_on-app-ready.
Second, events rely on being defined separately and then referenced in the config:
I’d recommend revising your approach. Also, for additional information you can check out browser console after running the editor to see if any error has been prompted.
Thanks for your answer. In VUE you can specify props like “my-props-name” even if props name “myPropsName”. You can also pass the function as anonymous, but I did exactly as in the example.
here my full code:
And all works well. For example when I open a document I see a message “DOCUMENT IS OPEN” in the console. And ONLY when i add “onRequestHistory” event i see versions button and ONLY when i click button i see message “I CLICK BUTTON ‘VERSIONS’”. But how i can call methods?
The documentation says that I should use the docEditor object and use it only after calling event
Documentation says i can create object like this:
“var docEditor = new DocsAPI.DocEditor(“placeholder”, config);”
But where can I get the DocsAPI object?
I have this object in my window, there is also a DocEditor object. but when i tried
something like:
docEditor = new window.DocsAPI.DocEditor(“placeholder”, config);
but when I do this, I get a cycle of creating an editor and in the cycle I see a message from the event
onAppReady
If I correctly understood the essence of how this works, I add callback functions for certain events and there I must call methods in them. So my question is from which object should I call these methods?