Статьи с тэгом :
Закрыть
История изменений
Закрыть
Попробовать в облаке
Попробовать в облаке
Справочный центр
Интеграция

About the ONLYOFFICE and Plone integration

ONLYOFFICE offers an official connector to integrate ONLYOFFICE Docs with Plone and edit documents within the content management system. You can download the ONLYOFFICE connector from PyPi.org and the ONLYOFFICE GitHub page.

To learn more about the ONLYOFFICE and Plone integration connector and how it works in detail, please visit our API documentation.

Main features

  • Editing and viewing text documents, spreadsheets, and presentations.
  • Co-editing documents in real-time: two co-editing modes (Fast and Strict), the Track Changes mode, comments, and the built-in chat.
  • JWT support to secure your traffic so that no one can have access to your documents with the exception of the users with proper rights.

Supported formats

  • For editing and viewing: DOCX, PPTX, XLSX
  • For viewing only: PDF, ODT, ODS, ODP, DOC, XLS, PPT

What's new in version 2.0.0

Added

  • JWT support

Fixed

  • Issue when files inside unpublished folders could not be edited

The full change log is available here.

Connecting ONLYOFFICE Docs to Plone

Requirements

  • ONLYOFFICE Docs (Document Server) 5.9.4 or later

    You need an instance of ONLYOFFICE Docs that is resolvable and connectable both from Plone and any end clients. It must be able to POST to Plone directly.

    Please refer to the official documentation page to learn more about installing ONLYOFFICE Docs.
  • Python 3.4 and later
  • ONLYOFFICE integration plugin 2.0.0 for Plone

Installing the ONLYOFFICE integration plugin for Plone

  1. Add the onlyoffice.connector line to the eggs section of the ~/plone/zinstance/buildout.cfg file, so it should look the following way:

    [buildout]
    ...
    eggs =
            onlyoffice.connector
  2. For the changes to take effect, re-run buildout from your console as a non superuser:

    sudo -u plone_buildout /plone/zinstance/bin/buildout
  3. Restart your instance:

    sudo /plone/zinstance/bin/instance restart
  4. Open your browser, go to your Plone page, log in as Admin and open Site Setup > Add-ons section. Find the onlyoffice.connector among the available add-ons and press the Install button to enable it.

Configuring the ONLYOFFICE integration plugin for Plone

To configure plugin:

  1. Go to Site Setup.
  2. Scroll down to the Add-ons Configuration section.
  3. Press the ONLYOFFICE Configuration button.
  4. In the Document Editing service field, specify the URL address where the ONLYOFFICE Docs is located.
  5. In the Secret Key field, specify the secret used to sign the data. For more details, see the Enabling JWT for the ONLYOFFICE and Plone integration section of this article.
  6. In the Server address for internal requests from the Document Editing Service field, specify the address that is used to access Plone from Document Editing Service.
  7. In the Document Editing Service address for internal requests from the server field, specify the address that is used to access Document Editing Service from Plone.
ONLYOFFICE_configure ONLYOFFICE_configure

Enabling JWT for the ONLYOFFICE and Plone integration

To protects documents from unauthorized access, ONLYOFFICE editors use the JSON Web Token (JWT). The token is added in the configuration when the Document Editor is initialized and during the exchange of commands between inner ONLYOFFICE Docs services. The secret key is used to sign the JSON web token and validate the token upon the request to ONLYOFFICE Docs.

To protect your documents, you need to enable the token validation and specify your own secret key in the ONLYOFFICE Docs configuration file, then specify the same secret key in the connector settings.

Step 1: Configure ONLYOFFICE Docs

  1. Open the local.json file with any available text editor.
    • For Linux - /etc/onlyoffice/documentserver/local.json
    • For Windows - %ProgramFiles%\ONLYOFFICE\DocumentServer\config\local.json
    • For Docker – enter the ONLYOFFICE Docs container using the docker exec -it <containerID> bash command and open /etc/onlyoffice/documentserver/local.json
  2. Enable token validation by changing the false value to true in three sections:
    • services.CoAuthoring.token.enable.browser
    • services.CoAuthoring.token.enable.request.inbox
    • services.CoAuthoring.token.enable.request.outbox
  3. Specify your own secret key by replacing the secret value with your own text string in three sections. The secret key must be the same.
    • services.CoAuthoring.secret.inbox.string
    • services.CoAuthoring.secret.outbox.string
    • services.CoAuthoring.secret.session.string
    {
      "services": {
        "CoAuthoring": {
          "token": {
            "enable": {
              "request": {
                "inbox": true,
                "outbox": true
              },
              "browser": true
            }
          },
          "secret": {
            "inbox": {
              "string": "yoursecret"
            },
            "outbox": {
              "string": "yoursecret"
            },
            "session": {
              "string": "yoursecret"
            }
          }
        }
      }
    }
    
  4. Save your changes.
  5. Restart the services for the config changes to take effect.
    supervisorctl restart all

Step2: Specify the same secret key in the connector settings

In the connector settings, specify the same secret in the Secret key field and save the settings.

Start using ONLYOFFICE Docs within Plone

To edit a document:

  1. Find the needed document on the Contents tab.
    ONLYOFFICE_editfile ONLYOFFICE_editfile
  2. Click the document.
  3. On the opened page, click the ONLYOFFICE Edit button to open the document for editing and/or viewing.
    ONLYOFFICE_editfile1 ONLYOFFICE_editfile1
Скачать Лучшие редакторы на вашем сайте Совместно просматривайте и редактируйте
все типы текстовых файлов, таблиц и презентаций
Вас также может заинтересовать:
Закрыть