Hallo everybody,
we are integrating OnlyOffice 6.3 into our application and we’re using the docker version (Linux) of the Community edition.
We started using the Python Example (using it as a service) but some features are hard to implement due to some lacks of instructions: for example, it is unclear to us how to fire the event “onRequestSaveAs” which should allow the user to set up a new name for the current document under editing…
Inside the Python Example folder there is a sort of “commander” (actions.py), a set of I/O methods which exchange information between the underlying services (Document Manager, Document Storage Services and so on) through http requests.
Moreover there are a couple of templates (index.html and editor.html) which hold a set of commands and events that gives instructions to the DOM (Document Object Model).
Putting the correct event inside the configuration section (editor.html):
config.events = {
…
‘onRequestSaveAs’: onRequestSaveAs,
…
};
and writing the relative function:
var onRequestSaveAs = function(event) {
var title = event.data.title;
var url = event.data.url;
docEditor.showMessage(‘onRequestSaveAs - title:’+title+’\nurl:’+url);
…
};
we can’t see the message/tooltip (set up by docEditor.showMessage); even if we replace “docEditor.showMessage” with a standard javascript command “alert(‘title:’+title)” the is no result shown (so the function is not fired)
In a different case, using this configuration:
config.events = {
‘onRequestRename’: onRequestRename,
};
and the corresponding function:
var onRequestRename = function(event) {
var title = event.data;
docEditor.showMessage(‘onRequestRename - title:’+title);
};
We’re able to show correctly the tooltip on the screen but we can’t figure out HOW to proceed further to effectively change the name of the file under editing (it seems that none of the available API methods could be applied to accomplish the “rename” requirement).
Can anybody help us to locate the correct way to create the actual interaction between the DOM javascript methods and the service ones (those in Python)?
Thank you in advance