Installation - Self-hosted | ONLYOFFICE

const config = {
document: {
fileType: "docx",
key: "Khirz6zTPdfd7",
title: "Example Document Title.docx",
url: "https://example.com/url-to-example-document.docx",
},
documentType: "word",
editorConfig: {
callbackUrl: "https://example.com/url-to-callback.ashx",
},
};

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

Where example.com is the name of the server where document manager and document storage service are installed. You can use the URL https://static.onlyoffice.com/assets/docs/samples/demo.docx of our sample document for testing. See the How it works section to find out more on ONLYOFFICE Docs service client-server interactions.

The example above includes all the parameters necessary for ONLYOFFICE Docs correct startup.