What’s new in ONLYOFFICE API 9.4: Developer guide to the latest updates

29 May 2026By Ksenija
0:00 / 11:28

Summary

Version 9.4 of ONLYOFFICE introduces significant updates to its API, enhancing integration capabilities, custom plugins, and spreadsheet automation. Key improvements include Croatian language support, enhanced event parameters for role-aware form filling, new cursor control methods, and expanded functionalities in the Office JavaScript API, making it easier for developers to create more efficient and localized applications.

  • Croatian language support added for localized applications.
  • New role parameter in onStartFilling event enhances form filling.
  • Plugin command logging simplifies debugging for developers.
  • Document merging capability introduced for automation scenarios.
  • Extensive updates to Spreadsheet API for structured data management.

Version 9.4 of ONLYOFFICE introduces major API improvements for integrations, custom plugins, and spreadsheet automation. This article highlights the key updates across the ONLYOFFICE Docs API, the Plugins and Macros API, and the Office JavaScript API, and explains what they mean for developers.

What's new in ONLYOFFICE API 9.4: Developer guide to the latest updates

ONLYOFFICE Docs API 9.4

Croatian language support

Croatian (hr) has been added to the list of supported interface languages. If you’re building localized applications for Croatian-speaking users, you can include it in your language configuration without workarounds.

What's new in ONLYOFFICE API 9.4: Developer guide to the latest updates

Role and user data in the onStartFilling event

The onStartFilling event now includes a roles parameter that carries role and user information. This makes it much easier to build role-aware form filling experiences, for example, routing users to the fields they’re responsible for, or triggering conditional logic based on who is filling out the form and in what capacity.

function onStartFilling(event) {
  const roles = event.data;
  console.log("Roles:", roles);
}

const config = {
  // ...
  events: {
    onStartFilling,
  },
};
const docEditor = new DocsAPI.DocEditor("placeholder", config);

Memory leak fix in destroyEditor

A memory leak in the destroyEditor method has been fixed. Previously, calling destroyEditor did not fully clean up allocated resources. If your application creates and destroys editor instances frequently, such as in single-page application setups or document preview workflows, this fix directly improves the memory footprint of your integration over time.

Removed field

The deprecated editorConfig.customization.commentAuthorOnly field has been removed. If your integration still references this parameter, now is the time to remove it to avoid any unexpected behavior.

Plugin command logging for easier debugging

One of the most practical additions for plugin developers is plugin command logging. Enable debug output of plugin commands directly in the browser console. If you’ve spent time debugging plugin behavior by guessing what commands are actually firing, this feature removes a significant amount of that friction. It gives you direct visibility into the plugin execution flow without needing to instrument your own logging.

Blocking specific plugins on load

The new editorConfig.plugins.disable parameter lets you prevent specific plugins from loading when the editor initializes. This is useful when you’re embedding the editor in a controlled environment and want to restrict functionality to what’s relevant for your users, without having to modify the plugin files themselves. It’s a cleaner, configuration-level approach to managing the plugin surface.

Check the full changelog for the Docs API

ONLYOFFICE Plugins and Macros API 9.4

New cursor control methods

Two new methods have been added to window.Asc.plugin.executeMethod for the Document API:

Asc.plugin.executeMethod("MoveCursorToField", [fieldId, true]);

Asc.plugin.executeMethod("MoveCursorOutsideField", [fieldId, false]);

These are particularly useful for plugins that guide users through form completion or automate field-by-field navigation in documents. Instead of relying on user interaction to advance through fields, your plugin can control cursor placement programmatically.

Improved StartAction and EndAction control

The StartAction method accepts two new parameters: lockScroll and keepSelection. The EndAction method gains scrollToTarget and cancel. Together, these give plugins finer control over the editor state during macro execution. You can preserve the user’s selection, prevent unwanted scrolling during automated operations, or cancel an action sequence cleanly — all of which contribute to a more stable and predictable plugin experience.

Check the full changelog for the Plugins and Macros API

Office JavaScript API 9.4

This is the most expansive part of the 9.4 release. The Office JavaScript API gains new capabilities across document operations, spreadsheet data management, form controls, and more. Check the full list of new methods

Document merging

A new Api/MergeDocuments method has been added to the Document API. This lets you combine multiple documents into one – a capability that’s been a frequent ask for automation scenarios such as report generation, contract assembly, and batch document processing.

Unified Color API across all editors

The Api/Color method is available in the Document, Spreadsheet, Presentation, and PDF APIs. Having a consistent color interface across all four editor types simplifies code that needs to apply styling across different document formats. You no longer need format-specific color handling logic for common operations.

Signature form support

Version 9.4 introduces the ApiSignatureForm class, available in both the Document API and the Form API. Along with it come GetValue and SetValue methods for reading and writing signature field data. This opens up programmatic handling of signature fields which are useful for workflows that need to pre-populate, validate, or extract signature data as part of a larger document processing pipeline.

// The GetValue method of ApiSignatureForm returns the signature image data stored in the form.

// Create a signature form, add it to the document, and read its current value.

let doc = Api.GetDocument();
let signatureForm = Api.CreateSignatureForm({"key": "Signature", "tip": "Please sign here", "required": true, "placeholder": "Signature"});
signatureForm.Value = "https://static.onlyoffice.com/assets/docs/samples/img/onlyoffice_logo.png";
let paragraph = doc.GetElement(0);
paragraph.AddElement(signatureForm);
let value = signatureForm.GetValue();
paragraph = Api.CreateParagraph();
paragraph.AddText("Signature form value: " + value);
doc.Push(paragraph);

Additionally, the new Api/CreateSignatureForm method in the Form API lets you create signature form fields from scratch through code, rather than relying on manual insertion.

Form state detection

The ApiFormBase/IsFilled method, added to both the Document API and the Form API, lets you check whether a given form field has been filled. This is a straightforward but important addition for any validation or submission logic. Inspect form completion state without parsing field content directly.

Form highlight inspection

Two new methods (ApiDocument/GetFormsHighlight and ApiDocument/GetControlsHighlight) are available in the Document and Form APIs. These let you retrieve the current highlight settings applied to form fields and content controls. If your integration manages form display configuration or needs to reflect highlight states in external UI elements, these methods provide the read access that was previously missing.

Extensive Spreadsheet List Object API

This is the most feature-dense addition in 9.4. The Spreadsheet API includes a full ApiListObject class for working with structured table objects (list objects), along with supporting classes for columns, rows, and sorting.

Key capabilities include:

  • Creating and retrieving list objects via ApiWorksheet/AddListObject and ApiWorksheet/GetListObjects
  • Reading and writing table properties such as name, display name, alternative text, style, headers, totals, and auto-filter settings
  • Accessing table ranges including header rows, data body ranges, and totals rows
  • Managing columns and rows through ApiListColumn and ApiListRow, with methods for names, indexes, ranges, totals calculation, and deletion
  • Sorting support via the new ApiSort, ApiSortFields, and ApiSortField classes — covering sort orientation, match case, sort-on criteria (value or color), priority, and more

If your integration involves any kind of structured data management in spreadsheets such as data imports, dynamic table creation, report generation. This addition significantly expands what you can do without asking users to manipulate tables manually.

New Spreadsheet Fill and Formula methods

Four directional fill methods have been added to ApiRange: FillDown, FillUp, FillRight, FillLeft.

These mirror the spreadsheet fill behavior that users trigger manually, now available for programmatic use. Combined with the new ApiRange/SetFormula method, you can build automation that constructs formula-driven ranges dynamically. It’s useful for generated reports, templated spreadsheets, and data entry automation.

The Api/GetDefNames method has also been added to the Spreadsheet API, giving you access to the defined names (named ranges) in a workbook.

Text form formatting controls

The ApiTextForm class gains four new methods in both the Document and Form APIs:

  • GetFormat/SetFormat: read and apply a format mask to the text field
  • GetAllowedSymbols/SetAllowedSymbols: control which characters users can enter

These are essential for building validated data entry forms, for example, enforcing date formats, restricting input to numeric characters, or applying custom masks for phone numbers or IDs.

Paragraph property inspection

A set of Get methods has been added to ApiParaPr in the Document API, covering:

  • Border properties: top, left, right, bottom, between
  • Pagination: GetKeepLines, GetKeepNext, GetPageBreakBefore, GetWidowControl
  • List: GetNumPr
  • Tabs: GetTabs
  • Spacing: GetContextualSpacing

These fill a long-standing gap. You could set many of these properties programmatically, but reading them back wasn’t always possible. You can inspect paragraph formatting without relying on workarounds, which is particularly useful for document analysis tools and template validation scripts.

Content Control color

The ApiInlineLvlSdt class in the Document API supports SetColor and GetColor methods. You can assign and read highlight colors for inline content controls, making it easier to build visually distinct form experiences or highlight controls based on their state.

// How do I change the color of an inline content control in a document?

// Apply a specific RGB color to visually distinguish a content control in a document.

let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
let inlineLvlSdt = Api.CreateInlineLvlSdt();
let run = Api.CreateRun();
run.AddText("This is an inline text content control with a blue tag color.");
inlineLvlSdt.AddElement(run, 0);
inlineLvlSdt.SetColor(Api.RGB(0, 0, 255));
paragraph.AddInlineLvlSdt(inlineLvlSdt);

Create your free ONLYOFFICE account

View, edit and collaborate on docs, sheets, slides, forms, and PDF files online.