Skip to main content
Render Doconda’s editor plugin (@doconda/editor) with readOnly: <DocondaEditor src={url} readOnly />. The .docx shows inside your site with its styles, tables, images and comments, with no toolbars and nothing editable. The same component shows .pptx and .xlsx, and the file opens in the user’s browser: it isn’t uploaded anywhere to be shown.

Steps

  1. Get the plugin in the dashboard (Editor), with a 7-day free trial. See Licence and domains.
  2. Install it with the command the dashboard gives you. It needs React 19 or later:
  1. Render the viewer in a container with a height, with readOnly:
src is a .docx the browser can download: from your site, or from a server that allows it with CORS. If the link needs authentication, requestInit is passed as is to fetch:

What read-only mode does

  • Nothing can change the document: not typing, pasting, dragging or keyboard shortcuts.
  • The toolbar, the second toolbar and the AI assistant disappear, and no recovery copy is kept.
  • Users can still read, select and copy text, move between pages, slides and sheets, and present.

Switch from viewer to editor without reloading

readOnly can change at any time, without reopening the file:

FAQ

Yes. Read-only removes editing, not content: styles, tables, images and comments all show.
Yes. Pass it in file instead of src, as a File, Blob, ArrayBuffer or Uint8Array, with its name in fileName.
Yes. Put your spinner over the editor and remove it in onReady, which fires when the file has opened.
On your licence’s domains (up to 5, https only), and always on localhost for development. See Licence and domains.