How to Integrate Drupal and ONLYOFFICE Docs on Ubuntu

0
61


If you feel like building your own website or blog, you can always find a professional developer who could get this done for you in the shortest possible time.

However, it might be much more exciting and challenging to create something on your own. Modern software tools make the process of website creation simple, and even average Linux users with no deep technical background are able to do that.

Drupal is a powerful open-source content management system that you can use to develop simple websites for personal use or sophisticated web-based applications for any particular purpose.

The strength of Drupal lies in its simplicity, scalability, and customization as there are thousands of modules and themes created by third-party developers and contributors.

Among all available Drupal modules, there is an interesting option allowing you to enable document editing and real-time collaboration within the platform. With this aim in view, you should install ONLYOFFICE Docs and activate its module to get access to the features of this open-source office suite.

In this guide, you will know how to install ONLYOFFICE Docs and Drupal on Ubuntu, and how to integrate them to create a collaborative environment for content management and website creation on your server.

Install Drupal on Ubuntu

If you don’t have Drupal installed on your Ubuntu machine, you can take a look at our Drupal installation guide, which will help you to go through the installation and configuration process with ease.

However, you are always welcome to skim through the official Drupal documentation for the latest information and instructions.

Install ONLYOFFICE Docs on Ubuntu

After installing and launching Drupal, you need to install ONLYOFFICE Docs, which is an open-source and web-based office suite for documents, spreadsheets, presentations, digital forms, e-books, and PDF files.

The suite is designed for collaborative document editing and allows you to use its ChatGPT plugin for text generation and other related tasks.

Apart from Drupal, there is an opportunity to integrate it with other third-party software, such as e-learning platforms, document management systems, and file storage solutions.

The official integration list includes Seafile, Nextcloud, Moodle, WordPress, Alfresco, Odoo, Redmine, Chamilo, etc.

ONLYOFFICE Document Editor
ONLYOFFICE Document Editor

You can install ONLYOFFICE Docs on Ubuntu in various ways. For example, you can deploy the latest version of ONLYOFFICE Docs (ONLYOFFICE Document Server) on your server with the help of this Tecmint guide. Alternatively, you can run ONLYOFFICE Docs via Docker.

When ONLYOFFICE Docs and Drupal are running, the next step requires you to add and install a special ONLYOFFICE module to complete the process.

Install ONLYOFFICE Module for Drupal

When it comes to Drupal modules, the best way of adding them is using Composer, a tool that lets you download or update files and their dependencies in the Drupal core software.

To install the ONLYOFFICE module, you just need to copy the corresponding Composer command and run it from your command line:

$ composer require drupal/onlyoffice

When the command is finished, you will see a message indicating that the ONLYOFFICE module has been successfully added to your project’s composer.json file.

Now it’s time to enable the module, which can be done using this drush command:

$ drush pm:enable onlyoffice

You will see some instructions on the screen. Follow them to get the process done.

Configure ONLYOFFICE Module

First of all, open the ~/config/system/onlyoffice-settings page to access the ONLYOFFICE settings and enter this URL address to make sure your ONLYOFFICE Docs instance (ONLYOFFICE Document Server) is connected:

https://documentserver/

This URL address must be the name of your Linux server where ONLYOFFICE Docs Server is deployed.

You will also see the Secret key field, which is used for JWT protection that is enabled by default. That means that the JWT secret key is generated automatically for security reasons. Of course, you can enter your own secret key.

However, you will have to specify the same secret key in the config file of ONLYOFFICE Docs (Document Server) to enable validation. If you don’t need JWT protection, leave the corresponding field blank.

ONLYOFFICE Settings Page
ONLYOFFICE Settings Page

If the ONLYOFFICE module is configured correctly, you can make use of the full potential of the suite within the Drupal platform.

For example, here is what you can do:

  • Open and edit documents presentations and spreadsheets (DOCX, PPTX, and XLXS respectively).
  • Open other file extensions for viewing, like DjVu, PDF, DOC, EPUB, FB2, RTF, HTML, ODT, OTT, and so on.
  • Add ONLYOFFICE elements to your public pages to allow visitors to view office files.
  • Co-edit documents in real-time with other Drupal users using two co-editing modes.
Conclusion

The ONLYOFFICE and Drupal combined solution makes it possible to create a customizable content creation environment that you can use to build websites, forums, blogs and web pages.

The document editing and co-authoring features provided by ONLYOFFICE Docs make the process of website creation easier as you don’t need to rely on other office applications and can deal with office docs within the Drupal platform.



Source link