Overview

As any document is a composite object consisting of a tree of larger nodes (paragraphs and tables) where it is possible to insert smaller document elements (text runs, images, charts, shapes), Office API allows to insert the content and format it to your liking quickly and easily.

Office API is the JavaScript library which is used to work with the document editor. It contains classes and methods for every document type: Text document API, Spreadsheet API, Presentation API, and Form API.

Where to use

Here are some examples of where you can use Office API:

  • build plugins using Office API in the plugin code .js file to interact with the editor content and web services;
  • write macros using the JavaScript syntax and Office API scripting notation;
  • generate documents using Office API in the Document Builder scripts.

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).