Hi everyone,
I’m currently working on a React application, and I need some guidance on how to load the Word editor using OnlyOffice DocsAPI. I’ve attempted to implement the editor using the following code:
<DocumentEditor
id=“docxEditor”
documentServerUrl=“https://documentserver/”
config={{
document: {
fileType: “docx”,
key: “Khirz6zTPdfd7”,
title: “Example Document Title.docx”,
url: “https://d2nlctn12v279m.cloudfront.net/assets/docs/samples/demo.docx”
},
documentType: “word”,
}}
height=“800px”
events_onDocumentReady={onDocumentReady}
events_onDocumentStateChange={onDocumentStateChange}
events_onChangeContentControl={onChangeContentControl}
/>
However, the DocsAPI keeps throwing an error with the message: “Error load DocsAPI from - https://documentserver/”. I suspect that the issue lies in the document server configuration.
I have referred to the official OnlyOffice documentation here: Installation Guides - Docs Developer Edition - ONLYOFFICE
Could anyone please guide me through the necessary server configuration steps for DocsAPI? Any help or pointers would be greatly appreciated.
FYI
I’m using react as the front end and Node js as the back end.
Thank you!