DEV Community

Cover image for Power up your integrations: ONLYOFFICE API updates in Docs 9.1 & DocSpace 3.5
Kseniya Fedoruk for ONLYOFFICE

Posted on

Power up your integrations: ONLYOFFICE API updates in Docs 9.1 & DocSpace 3.5

The latest releases of ONLYOFFICE Docs 9.1 and DocSpace 3.5 are here, and they bring a host of powerful API enhancements for developers. These updates are designed to give you more control, flexibility, and power when integrating ONLYOFFICE into your applications. Let's dive into the specifics and explore what you can now achieve.

New format support and conversion

To broaden document compatibility, we’ve added support for new formats and expanded the conversion capabilities:

Customization

We’re giving you more control over the look and feel of the editors. The editorConfig.customization.uitheme parameter, which defines the editor’s theme, is now available for mobile editors. This allows you to create a consistent visual experience across all platforms.

We’ve also updated the size requirement for the editorConfig.customization.logo.image. You can now use an image with dimensions of 300×20 pixels to display your custom logo in the editor’s header.

const config = {  
   editorConfig: {    
     customization: {
      logo: {        
      image: "https://example.com/logo.png",
      ....
      uiTheme: "theme-dark", ...
Enter fullscreen mode Exit fullscreen mode

WOPI integration

For those using the Web Application Open Platform Interface (WOPI), we’ve introduced the UserCanOnlyComment property to the CheckFileInfo operation. This boolean property lets you specify if a user should have comment-only permissions, restricting them from making other edits.

Additionally, we’ve improved error handling. If a document cannot be locked via WOPI, it will now open in viewer mode with an appropriate error message, ensuring a smoother user experience.

New method for plugins

We’ve expanded the API for spreadsheets and presentations with the RemoveOleObject method (for sheets / for slides). This allows you to programmatically remove an OLE object from a workbook or presentation using its internal ID, providing greater control over embedded content.

expression.RemoveOleObject(internalId);

Office API

Version 9.1 introduces a significant number of new methods to the Office JavaScript API. These additions open up powerful new possibilities for programmatic document manipulation, especially within spreadsheets. Key areas of expansion include:

  • Conditional formatting: A comprehensive set of methods for managing conditional formatting rules, including above average, color scales, data bars, icon sets, top 10, and unique values.
  • Geometry and pathing: New methods for working with geometry, paths, and path commands, giving you finer control over shapes and drawings.
  • Custom XML: Methods for interacting with custom XML parts within documents.
  • Object and property management: New conversion methods and tools for managing document properties.
  • Advanced object control: Enhanced methods for working with sections, workbooks, pivot tables, ranges, and presentations.

Check the full list of new methods

Updated SDKs and integration examples

To support these updates, we’ve released an updated Java SDK that is compatible with Docs 9.1. It includes support for the new presentation-to-TXT conversion and HTML format handling.

We’ve also refreshed our test examples for connecting the editors, including Node.js examples that demonstrate format support for Docs v9.1. Check it out on GitHub

Updates in ONLYOFFICE DocSpace 3.5

The new Plugins SDK introduces several key changes aimed at improving security and modal dialog functionality.

  • Enhanced file security: We have moved file security settings into a separate FilesSecurity enum for better organization and clarity. The IFileItem interface now includes fileSecurity and security properties.
  • Improved modal dialogs: You can now create modal dialogs with more control over their appearance using the withoutBodyPadding and withoutHeaderMargin properties. We’ve also added the updateCreateDialogModal action for dynamic updates.
  • Smarter create dialogs: The ICreateDialog interface has been enhanced with new properties like isAutoFocusOnError, errorText, onError, onChange, isCloseAfterCreate, and isCreateDisabled, giving you more granular control over user interactions and form validation.

You are also welcome to check the updated system plugins (draw.io, Markdown, PDF Converter, Speech-to-Text) based on SDK 2.0.0 in action within DocSpace.

To align with the DocSpace 3.5 release, we have updated our API SDKs across multiple languages. These SDKs provide a convenient way to interact with the DocSpace API, manage files, users, and rooms programmatically.

The updated SDKs are available for:

  • TypeScript: @onlyoffice/docspace-api-sdk on npm
  • C#: DocSpace.API.SDK on NuGet
  • Python: docspace-api-sdk on PyPI

Useful links

Top comments (0)