@doconda/editor): a React component you
pass the file to, as a link or as a File. Users edit it in a full Word editor and save() gives you back the edited
.docx. Everything happens in their browser: the file is not uploaded anywhere to be edited.
Steps
- Get the plugin in the dashboard (Billing → Editor plugin), with a 7-day free trial. See licence and domains.
- Install it with the command from the dashboard (it needs React 19 or later):
- Open the file. From a link:
File from an <input type="file"> (a Blob, ArrayBuffer or Uint8Array also
works):
- Get the edited file through a
ref:
fileName says). The ref also has bytes() (the bytes, not
wrapped in a File), focus() and isDirty() (whether there are unsaved changes).
- Send it to your server:
Useful events
What it edits
Text and paragraph styles, fonts, colours, lists, tables, images, shapes, links, columns, header and footer, footnotes, comments, table of contents, find and replace, and print or save as PDF. Whatever the editor does not touch is saved as is.FAQ
Is the document uploaded to a server to be edited?
Is the document uploaded to a server to be edited?
No. It is edited in the user’s browser. It only leaves it if you send it, for example from
onSave.Can I use it without React?
Can I use it without React?
No: it is a React component and needs React 19 or later.
What if the link needs authentication?
What if the link needs authentication?
Pass
requestInit, which goes to fetch as is: for example,
requestInit={{ headers: { Authorization: `Bearer ${token}` } }}.Can I save it as a new version in Doconda?
Can I save it as a new version in Doconda?
Yes, from your server with
POST /documents/{id}/versions. See editor plugin: save.