Config | ONLYOFFICE

The config base section allows to change the platform type used, document display size (width and height) and type of the document opened.

Defines the document height (100% by default) in the browser window.

Defines the encrypted signature added to the ONLYOFFICE Docs config in the form of a token.

Example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.LwimMJA3puF3ioGeS-tfczR3370GXBZMIL-bdpu4hOU"

Defines the platform type used to access the document. Can be:

The default value is desktop.

Defines the document width (100% by default) in the browser window.

const config = {
documentType: "word",
type: "desktop",
height: "550px",
width: "100%",
token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.LwimMJA3puF3ioGeS-tfczR3370GXBZMIL-bdpu4hOU",
};

const docEditor = new DocsAPI.DocEditor("placeholder", config);