DEV Community

Cover image for ONLYOFFICE API v.7.2
Kseniya Fedoruk for ONLYOFFICE

Posted on

ONLYOFFICE API v.7.2

Along with the release of the new features in version 7.2, we updated API for the editors and plugins.

Live viewer and new license parameters

Live viewer allows users to see the changes made by other collaborators in real time when opening a document, spreadsheet, or presentation in the view only mode. Learn more

To implement this feature, you need to get a new license which will include separate fields for live viewer: connections_view and users_view_count for the number of connections and users, and users_view for user quota.

Working with documents from the outside

A new API class allows interacting with text documents, spreadsheets, presentations, and fillable forms from the outside. This way, you can create a special connector to make changes to the documents using your own buttons/methods instead of the editor buttons. For example, you will be able to generate a feed with comments from all your documents, reply to them and close comments in one place, or automatically fill out forms with the data exported from databases.

Please note: the Connector API class is included in the Advanced API and at the moment is available as a demo only (it will be added to the API documentation with the next update – version 7.2.1). If you would like to try it now, please contact our sales team at sales@onlyoffice.com.

API enhancements for plugins

Plugin marketplace. The new plugin manager allows users to explore all available plugins and install or remove any plugin with just one click right in the editors. In this regard, we updated instructions in the API documentation on creating and adding plugins.

Updated localization scheme. Now you can add a langs.json file in the folder with translations. Learn more

New methods: ChangeOleObject, GetAllForms, GetFileToDownload, GetFormsByTag, GetFormValue, GetImageDataFromSelection, GetInstalledPlugins, InstallPlugin, PutImageDataToSelection, RemovePlugin, SetFormValue, ShowButton, UpdatePlugin, etc.

Check the full API changelog for plugins

JWT enabled by default

Starting from version 7.2, a random JWT secret is automatically generated and just needs to be added on the side of the host application. You can obtain the default JWT secret and replace it with a custom key if required. Learn more

Other API updates

Dark Contrast theme. Enable a new Dark theme variation in the editorConfig.customization.uiTheme parameter. It has even darker shades, while the working surface is almost black.

"customization": { ......
   "uiTheme": "theme-contrast-dark",
    }, .......
Enter fullscreen mode Exit fullscreen mode

Adjusting About section. You can now add your company phone number in the About section in the editors, along with your logo, address, email, etc. To do it, configure the editorConfig.customization.customer parameter.

"editorConfig": {         
    "customization": { ........
         "customer": {
         "address": "My City, 123a-45",
           .....
         "phone": "37188888888"
           },
Enter fullscreen mode Exit fullscreen mode

Four-letter language codes. The editorConfig.lang parameter which defines the editor interface language supports four-letter codes. For example, to set Portuguese language, specify pt-pt, while pt-br indicates Brazilian Portuguese. The same refers to the language codes zh-cn (Simplified Chinese) and zh-tw (Traditional Chinese).

"editorConfig": {
.....
 "lang": "pt-pt",
Enter fullscreen mode Exit fullscreen mode

New action for WOPI discovery. The embedview action in WOPI discovery renders a non-editable view of a document that is optimized for embedding in a web page.

<action name="embedview" ext="docx"...
Enter fullscreen mode Exit fullscreen mode

Updated pricing calculator

The new package calculator allows configuring more parameters like multitenancy and multi-server, access to advanced API, live viewer, etc. Learn more

Useful links

API changelog

Updated API for Document Builder

Updates in ONLYOFFICE Docs 7.2

Get ONLYOFFICE Docs 7.2 Developer Edition

Top comments (0)