ONLYOFFICE Connector for HumHub
This plugin enables users to edit office documents from HumHub using ONLYOFFICE Document Server.
The plugin is available in the official HumHub Marketplace.
Installing ONLYOFFICE Document Server
You will need an instance of ONLYOFFICE Document Server that is resolvable and connectable both from HumHub and any end clients. If that is not the case, use the official ONLYOFFICE Document Server documetnation page: Document Server for Linux. ONLYOFFICE Document Server must also be able to POST to HumHub directly.
The easiest way to start an instance of ONLYOFFICE Document Server is to use Docker.
Installing ONLYOFFICE Connector for HumHub
Either install it from HumHub Marketplace or simply clone the repository inside one of the folder specified by moduleAutoloadPaths parameter. Please see HumHub Documentation for more information.
Configuring ONLYOFFICE Connector for HumHub
In order to configure plugin you must navigate to Administation -> Modules. Find ONLYOFFICE plugin and click Configure.
How it works
The ONLYOFFICE integration follows the API documented here:
When creating a new file, the user will be provided with Document, Spreadsheet or Presentation options in the Create document menu.
The browser invokes the index method in the /controllers/CreateController.php controller.
Or, when opening an existing file, the user will be provided with View document or Edit document depending on an extension.
A popup is opened and the index method of the /controllers/OpenController.php controller is invoked.
The app prepares a JSON object with the following properties:
HumHub takes this object and constructs a page from views/open/index.php template, filling in all of those values so that the client browser can load up the editor.
Then ONLYOFFICE Document Server downloads the document from HumHub and the user begins editing.
ONLYOFFICE Document Server sends a POST request to the callbackUrl to inform HumHub that a user is editing the document.
When all users and client browsers are done with editing, they close the editing window.
After 10 seconds of inactivity, ONLYOFFICE Document Server sends a POST to the callbackUrl letting HumHub know that the clients have finished editing the document and closed it.
HumHub downloads the new version of the document, replacing the old one.
Download the ONLYOFFICE Connector for HumHub here.