.docx to Doconda’s editor plugin (@doconda/editor), as a link in src or as a File in file. It is a
React component, or the <doconda-editor> tag in any other framework. Users edit the file in a full Word editor in
their browser, and save() returns the edited .docx as a Uint8Array; nothing is uploaded unless you send it.
Steps
- Get the plugin in the dashboard (Editor), with a 7-day free trial. See Licence and domains.
- Install it with the command the dashboard gives you. 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:
save("pdf") returns a PDF instead (also "md", "txt" or "png"). The ref also has open(), print() and
run(id), which presses a toolbar button by its ID.
- Send it to your server:
Events
What it edits
Text and paragraph styles, fonts, colours, lists, tables, images, shapes, links, columns, header and footer, footnotes, comments, table of contents, and find and replace. Whatever the editor doesn’t 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 and only leaves it if you send it, for example from
onSave.Can I use it without React?
Can I use it without React?
Yes. In Angular, Vue or a page with no framework, use the
<doconda-editor> tag from @doconda/editor/element.
See Angular, Vue or plain JavaScript.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 back to Doconda?
Can I save it back to Doconda?
Yes. From your server, call
documents.updateFile(id, file) (PUT /v1/documents/{id}/file). It is free and
makes a new PDF and a change report. See Editor plugin: save.Related
- Editor plugin: every prop, event and method.
- How do I add a Word (DOCX) editor to a React app?