Version 9.4 of ONLYOFFICE brings a solid set of API improvements across three areas: the Docs API, the Plugins and Macros API, and the Office JavaScript API. Whether you're building integrations, writing plugins, or automating document workflows, this release adds capabilities that reduce friction and open up new possibilities.
Here's a breakdown of what changed and why it matters.
ONLYOFFICE Docs API 9.4
Role-Aware Form Filling with onStartFilling
The onStartFilling event now includes a roles parameter carrying role and user data. This means you can build form filling experiences that respond to who is filling out the form, routing users to the fields they're responsible for, or triggering conditional logic based on their role.
function onStartFilling(event) {
const roles = event.data;
console.log("Roles:", roles);
}
const config = {
events: { onStartFilling },
};
const docEditor = new DocsAPI.DocEditor("placeholder", config);
This is a practical improvement for any integration involving multi-role forms: think contracts, approval workflows, or structured data collection.
Memory Leak Fix in destroyEditor
If your application creates and destroys editor instances frequently - common in SPAs or document preview tools - this fix matters. Previously, destroyEditor didn't fully release allocated resources. That's now resolved, which improves memory stability over time in high-churn environments.
Plugin Command Logging
Debugging plugins just got easier. You can now enable plugin command logging to surface execution output directly in the browser console. Instead of guessing which commands are firing, you get direct visibility into plugin behavior without adding your own instrumentation.
Block Specific Plugins on Load
The new editorConfig.plugins.disable parameter lets you prevent specific plugins from initializing when the editor loads. It's a clean, configuration-level way to control the plugin surface in embedded environments, no need to modify plugin files.
Croatian Language Support
Croatian (hr) is now a supported interface language, useful if you're building localized apps for Croatian-speaking users.
Removed: commentAuthorOnly
The deprecated editorConfig.customization.commentAuthorOnly field has been removed. Check your integrations and remove any references to avoid unexpected behavior.
Plugins and Macros API 9.4
Cursor Control Methods
Two new methods give plugins programmatic control over cursor placement in form fields:
-
MoveCursorToField— moves the cursor to a specific field -
MoveCursorOutsideField— moves the cursor outside the current field
Asc.plugin.executeMethod("MoveCursorToField", [fieldId, true]);
Asc.plugin.executeMethod("MoveCursorOutsideField", [fieldId, false]);
These are especially useful for plugins that guide users through form completion step by step, or automate field-by-field navigation without depending on user interaction.
Finer Control Over StartAction / EndAction
StartAction gains two new parameters: lockScroll and keepSelection. EndAction gains scrollToTarget and cancel. Together, these let plugins maintain a more stable and predictable editor state during macro execution: preserving selections, preventing unwanted scroll jumps, or cleanly cancelling an action sequence.
Office JavaScript API 9.4
This is the largest part of the 9.4 release, with meaningful additions across document operations, form handling, and spreadsheet automation.
Document Merging
A new Api/MergeDocuments method lets you combine multiple documents into one programmatically. This is a frequently requested capability for automation scenarios like report generation, contract assembly, and batch document processing.
Signature Form Support
The new ApiSignatureForm class (available in both Document and Form APIs) enables full programmatic handling of signature fields. Create them, set values, and read them back:
let doc = Api.GetDocument();
let signatureForm = Api.CreateSignatureForm({
"key": "Signature",
"tip": "Please sign here",
"required": true,
"placeholder": "Signature"
});
signatureForm.Value = "https://example.com/signature.png";
let paragraph = doc.GetElement(0);
paragraph.AddElement(signatureForm);
let value = signatureForm.GetValue();
This opens up signing workflows that need to pre-populate, validate, or extract signature data as part of a larger pipeline.
Form Validation Improvements
Several additions make it easier to build robust form logic:
-
ApiFormBase/IsFilled— check whether a field has been filled, useful for submission validation without parsing raw field content -
ApiTextFormgetsGetFormat/SetFormatandGetAllowedSymbols/SetAllowedSymbols— apply format masks and restrict character input, essential for enforcing date formats, numeric-only fields, or custom input patterns like phone numbers or IDs
Spreadsheet Table Automation
The most feature-dense addition in 9.4 is the new ApiListObject class, which brings full programmatic control over structured table objects in spreadsheets.
Key capabilities:
- Create and retrieve list objects via
AddListObjectandGetListObjects - Read/write table properties: name, style, headers, totals, auto-filter
- Access header rows, data body ranges, and totals rows
- Manage columns and rows via
ApiListColumnandApiListRow - Sort tables with the new
ApiSort,ApiSortFields, andApiSortFieldclasses
If your integration handles structured data such as imports, dynamic tables, report generation, this is a significant unlock that removes the need for users to manipulate tables manually.
Directional Fill and Formula Methods
Four new fill methods have been added to ApiRange: FillDown, FillUp, FillRight, FillLeft. Combined with the new ApiRange/SetFormula, you can programmatically build formula-driven ranges for generated reports, templated spreadsheets, and data entry automation.
Paragraph Property Inspection
A set of Get methods has been added to ApiParaPr in the Document API — covering borders, pagination settings (GetKeepLines, GetKeepNext, GetPageBreakBefore, GetWidowControl), list properties, tabs, and spacing. Previously you could set these, but couldn't reliably read them back. This closes a long-standing gap for document analysis tools and template validation scripts.
Unified Color API
Api/Color is now available across Document, Spreadsheet, Presentation, and PDF APIs. One consistent color interface for all four editor types means you can apply styling logic across formats without writing format-specific handling code.
Useful links
Full changelog for the Docs API
Full changelog for the Plugins and Macros API
Top comments (0)