@doconda/editor) on your site,
and save the user’s version back with documents.updateFile. The agent writes the Word, PowerPoint or Excel file, the
user fixes what’s missing in the browser, and the saved version replaces the file in the same document at no charge.
Steps
- Create an API key in the dashboard (API keys), store it in
DOCONDA_API_KEYand install the SDK on your server:npm install @doconda/sdk. - Get the editor plugin (Editor, 7-day free trial) and install it with the command the dashboard gives you. It needs React 19 or later:
- On your server, create the document:
- Serve the file from a route of yours. The links in
doc.outputsexpire after 5 minutes and the browser can’t fetch them from your site, so download the bytes on the server:
- Open it in the editor. The route has no file extension, so pass
format:
- When the user is done, send the file to your server and save it over the same document:
What happens when you save
- The document’s
revisiongoes up by 1 and a new PDF is made from the saved file. - The report (
documents.report(id)) lists what the user changed inchanges, with the text before and after. - Saving a hand-edited version uses no AI and is free. See Save a hand-edited file.
- Pass
{ revision }toupdateFileto avoid overwriting someone else’s save: the request fails withrevision_conflictinstead. - Whatever the editor doesn’t touch is saved as is: styles, charts and notes are kept.
FAQ
Does it work with PowerPoint and Excel?
Does it work with PowerPoint and Excel?
Yes. Create the document with
format: "pptx" or "xlsx", download it in that format and pass the editor
format="slide" (PowerPoint) or format="cell" (Excel).Can I pass the file without a route?
Can I pass the file without a route?
Yes. If you already have the bytes in the browser, pass them in
file with the name in fileName.What if users should only review it, not change it?
What if users should only review it, not change it?
Add
readOnly. See How do I show a Word file read-only in React?.Is the editor paid separately?
Is the editor paid separately?
Yes. The editor plugin is bought per organization, separately from the API, with unlimited documents and users.
See Licence and domains.
Related
- Editor plugin: every prop and how to save.
- Edit with AI inside your app: users ask the editor’s assistant for the changes.
- SDK: create documents.