ONLYOFFICE Docs 7.4 for developers: API & Doc Builder updates

16 June 2023By Ksenija

Along with the release of the new features in version 7.4, we updated API for the editors, plugins, and Document Builder. Check all the details below.

ONLYOFFICE Docs 7.4 for developers: API & Doc Builder updates

Support for more file formats

Version 7.4 brings support for new file formats:

  • documents — mhtml, stw, sxw, wps, wpt;
  • spreadsheets — et, ett, sxc;
  • presentations — dps, dpt, sxi.

Further parameters for the setUsers method

The setUsers method sets a list of users to mention in the comments or grant the access rights to edit the specific sheet ranges.

The newly added users.id field defines the identification of the user. It is used only for protecting the sheet ranges when granting editing rights to the specified user.

And the newly added c parameter defines the operation type from the onRequestUsers event. It can take one of the following values – mention or protect.

docEditor.setUsers({
    "c": "protect",
    "users": [
        {
            "email": "john@example.com",
            "id": "78e1e841",
            "name": "John Smith"
        },
        {
            "email": "kate@example.com",
            "id": "F89d8069ba2b",
            "name": "Kate Cage"
        },
        ...
    ]
});

Drawing

From now on, the drawing functionality is available in each editor.

Users of ONLYOFFICE Docs Developer Edition with the extended licenses are able to display or hide this new Draw tab via the editorConfig.customization.layout.toolbar parameter.

Font size customization

The newly added size field, in the editorConfig.customization.font parameter, allows adjusting the font for the interface elements such as buttons, tabs, etc.

Please note: this option is available for users with the extended developer license.

Support for the Chinese dameng database

Among the supported database types there is the Chinese dameng. To connect it, change the database type to dameng. For example, for Docker you will need to adjust the DB_TYPE parameter.

Other updates

  • The useforrequest WOPI IP filter parameter changed to false.
  • mobileView and mobileEdit for WOPI discovery.
  • Updated node-redis connector.

Get the latest version of ONLYOFFICE Docs Developer Edition:

DOWNLOAD NOW

API enhancements for plugins

Thanks to the extended API, plugins can now have as many windows as you want (for example, you can execute a custom script in a separate window) and be dynamically embedded in the context menu of the editors. It gives you more freedom and enhances the number of possible usage scenarios for plugins.

One of the brightest examples here is our updated ChatGPT plugin. From now on, it provides more useful features such as word analysis, image generation, text summarization and keyword generation, translation, etc. Learn more

With the pluginsmanager server utility admins are now able, when a manual installation is required, to install or uninstall plugins with a single command line, instead of copying the folders, e.g.:

pluginsmanager --install zotero

pluginsmanager --install "zotero, chess"

pluginsmanager --uninstall zotero

Besides, we added lots of new events and methods for working with plugins, including:

Full list of plugin API updates

Check this code example for the InstallDeveloperPlugin method:

window.Asc.plugin.executeMethod ("InstallDeveloperPlugin", ["https://example.com/plugin/config.json"], 
function (result) {
    postMessage (JSON.stringify (result));
});

API updates for Document Builder

It’s now possible to conveniently debug the Doc Builder JS core in the Chrome or Chromium browser (available for Windows and Linux).

ONLYOFFICE Docs 7.4 for developers: API & Doc Builder updates

Moreover, in the Document Builder API, we added lots of new characters, font, and range methods to the Spreadsheet API, as well as some other methods, including the following ones:

Check the full list of new DocBuilder methods.

DOWNLOAD BUILDER