This content originally appeared on DEV Community and was authored by Kseniya Fedoruk
The latest release of ONLYOFFICE Docs is here, packed with updates that deliver more functionality, better customization, and improved performance. If you’re a developer or integrator looking to take advantage of the enhanced APIs, there’s plenty to explore in this version. Check all the details below.
Diagram Viewer
The newly introduced Diagram Viewer is available for web, desktop, and mobile web. It allows opening diagram files without the need for any third-party apps.
Where to find in API: the diagram document type is added to the documentType parameter.
Support for new file formats
ONLYOFFICE continues to expand its usability by supporting further file formats. In version 9.0, it’s possible to open Markdown and OpenDocument Graphic files for viewing.
Where to find in API: added opening for odg and md file types.
Additionally, with the launch of the Diagram Viewer, we added conversion from vsdm, vsdx, vssm, vssx, vstm, and vstx formats. Check API
Expanded customization options
Customization has been taken to new heights in version 9.0, empowering your end users to tailor their ONLYOFFICE experience exactly as they need.
New UI themes
Two new themes, Modern Light and Modern Dark, are presented to optimize the look and feel of each editor.
Where to find in API: The theme-white and theme-night theme ids are added to the editorConfig.customization.uiTheme parameter.
const config = {
editorConfig: {
customization: {
...
uiTheme: "theme-white",
...
Font size selection for the Simplified Chinese UI
The new parameter ensures accurate font sizing in Simplified Chinese layouts, offering the flexibility to use either Western or traditional Chinese styles.
Where to find in API: editorConfig.customization.forceWesternFontSize parameter, the default value is false.
const config = {
editorConfig: {
customization: {
....
forceWesternFontSize: false,
...
Hiding user avatars
The new parameter enables you to toggle user avatars in the editor header, helping create a clean, distraction-free interface.
Where to find in API: editorConfig.customization.layout.header.user parameter, the default value is true.
const config = {
editorConfig: {
customization: {
...
layout: {
header: {
editMode: true,
save: true,
user: true,
users: true,
},
Performance boost with preloading
Starting from version 9.0, you can preload static assets (HTML, CSS, JS, fonts) into the browser cache before opening a file to speed up the first-time loading of the document editor. Check API
Two options are available:
1) Using the ?preload=placeholder parameter
<div id="placeholder"></div>
<script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js?preload=placeholder"></script>
2) Manually inserting a preload iframe
<iframe src="https://documentserver/web-apps/apps/api/documents/preload.html" style="display:none;"></iframe>
API enhancements for plugins and macros
Custom buttons for Content Controls. Utilize the Asc.ButtonContentControl class to create unique buttons for your plugins. Define actions using the attachOnClick method and add your own icons to enhance functionality. Check API
(function(window){
window.Asc.plugin.init = function()
{
let button = new Asc.ButtonContentControl();
button.icons = '/resources/check%scale%(default).png';
button.attachOnClick(function(contentControlId){
Asc.plugin.executeMethod("RemoveContentControl", [contentControlId]);
});
button = new Asc.ButtonContentControl();
button.icons = '/resources/close%scale%(default).png';
button.attachOnClick(function(contentControlId){
Asc.plugin.executeMethod("RemoveContentControls", [[{"InternalId": contentControlId}]]);
});
}
})(window);
Setting the active slide by its index. Jump to any slide easily within presentations using the new GoToSlide method.
expression.GoToSlide(slideNumber);
Content Control list element. The introduction of the ContentControlListElement enumeration makes managing content controls within documents even simpler.
Asynchronous calculations. Manage any request within the body of a custom function created using macros.
(function () {
/**
* World Bank indicator value for a specific year.
* @customfunction
* @param {string} country ISO-3 code, e.g. "TUR"
* @param {string} indicator Indicator code, e.g. "SP.POP.TOTL"
* @param {number} year Four-digit year, e.g. 2024
* @returns {any} Numeric value or #N/A
*
* @example =WB("TUR","SP.POP.TOTL",2024)
*/
async function WB(country, indicator, year) {
// Build URL (World Bank allows CORS)
const url =
`https://api.worldbank.org/v2/country/${country}/indicator/${indicator}` +
`?format=json&per_page=20000`;
try {
const r = await fetch(url);
const [meta, data] = await r.json();
// Find the row for the requested year
const row = data.find((v) => v.date === year.toString());
if (!row || row.value == null) return "#N/A";
return row.value; // resolves the Promise
} catch (e) {
return "#ERROR";
}
}
// Register the function so it becomes a sheet formula
Api.AddCustomFunction(WB);
})();
New samples & Office API
With the latest API documentation update, we’ve included even more ready-to-use examples for Document Builder and macros, making your development process smoother and more efficient.
For the Office JavaScript API, we added lots of new methods for the version 9.0, including those for:
- Content Controls
- Custom XML
- Forms
- Custom properties
- Core
- Range
- Drawing
- Presentation
- Notes page
Useful links
ONLYOFFICE Docs for developers
Get the latest version of ONLYOFFICE Docs Developer
This content originally appeared on DEV Community and was authored by Kseniya Fedoruk

Kseniya Fedoruk | Sciencx (2025-07-01T13:17:52+00:00) ONLYOFFICE Docs 9.0 for developers: API updates. Retrieved from https://www.scien.cx/2025/07/01/onlyoffice-docs-9-0-for-developers-api-updates/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.