Confluence ONLYOFFICE integration app

This plugin enables users to edit office documents from Confluence using ONLYOFFICE Docs.

The connector is available in the official Atlassian Marketplace.

  • Currently, the following document formats can be edited or viewed: DOCX, XLSX, PPTX.
  • The plugin will create a new Edit in ONLYOFFICE menu option within the document library for Office documents. This allows multiple users to collaborate in real time and to save back those changes to Confluence.
  • Currently, the following document formats can be converted into OOXML: ODT, DOC, ODP, PPT, ODS, XLS.

You will need an instance of ONLYOFFICE Docs (Document Server) that is resolvable and connectable both from Confluence and any end clients (version 3.0 and later are supported for use with the plugin). If that is not the case, use the official ONLYOFFICE Docs documentation page. ONLYOFFICE Docs must also be able to POST to Confluence directly.

The easiest way to start an instance of ONLYOFFICE Docs is to use Docker.

Upload the compiled target/onlyoffice-confluence-plugin.jar to Confluence on the Manage add-ons page.

The latest compiled package files are available here and on Atlassian Marketplace.

You could also install the app from Confluence administration panel:

  1. Log into your Confluence instance as an administrator.
  2. Navigate to Manage add-ons page.
  3. Click Find new apps or Find new add-ons on the left panel.
  4. Locate ONLYOFFICE Connector for Confluence using search. Results will include the add-on versions compatible with your Confluence instance.
  5. Click Install to download and install the app.
  6. Now you can click Close in the Installed and ready to go dialog.

Find the uploaded Confluence ONLYOFFICE integration app on the Manage add-ons page. Click Configure and enter the name of the server with the ONLYOFFICE Docs installed:

https://documentserver/

where the documentserver is the name of the server with ONLYOFFICE Docs installed. The address must be accessible from the user browser and from the Confluence server. The Confluence server address must also be accessible from ONLYOFFICE Docs for correct work.

If you plan to compile the Confluence ONLYOFFICE integration app yourself (e.g. edit the source code and compile it afterwards), follow these steps:

  1. The stable Java version is necessary for the successful build. If you do not have it installed, use the following commands to install Open JDK 8:

    sudo apt-get update sudo apt-get install openjdk-8-jdk
  2. Install Atlassian Plugin SDK. Installation process is described here.
  3. Get a submodule: git submodule update --init --recursive
  4. Compile package: atlas-package
  1. User navigates to a Confluence attachments and selects the Edit in ONLYOFFICE action.
  2. Confluence makes a request to OnlyOfficeEditorServlet (URL of the form: /plugins/servlet/onlyoffice/doceditor?attachmentId=$attachment.id).
  3. Confluence sends a document to ONLYOFFICE Document storage service and receive a temporary link.
  4. Confluence prepares a JSON object with the following properties:

    • url - the temporary link that ONLYOFFICE Docs uses to download the document;
    • callbackUrl - the URL that ONLYOFFICE Docs informs about status of the document editing;
    • key - the UUID to instruct ONLYOFFICE Docs whether to download the document again or not;
    • title - the document title (name).
  5. Confluence takes this object and constructs a page from a freemarker template, filling in all of those values so that the client browser can load up the editor.
  6. The client browser makes a request to the JavaScript library from ONLYOFFICE Docs and sends ONLYOFFICE Docs the DocEditor configuration with the above properties.
  7. Then ONLYOFFICE Docs downloads the document from Confluence and the user begins editing.
  8. When all users and client browsers are done with editing, they close the editing window.
  9. After 10 seconds of inactivity, ONLYOFFICE Docs sends a POST to the callback URL letting Confluence know that the clients have finished editing the document and closed it.
  10. Confluence downloads a new version of the document, replacing the old one.

Download the Confluence ONLYOFFICE integration app here.