Set initial edit mode in Apryse DOCX Editor

Requirements
View Demo

The DOCX Editor supports multiple edit modes that determine how users can interact with a document.

Apryse Docs Image

You can choose from the following modes:

  • Editing – full editing capabilities are enabled.
  • Reviewing – users can suggest and review tracked changes.
  • Viewing – the document cannot be edited.

The initialEditMode property allows you to specify the default edit mode when a document is loaded. This property is part of the officeEditorOptions object, which is included in the WebViewerOptions parameter passed to the WebViewer function.

This may be added to the WebViewer options to set the initialEditMode as demonstrated below.

JavaScript

1WebViewer({
2 ...,
3 initialDoc: 'https://myserver.com/myfile.docx',
4 initialMode: Webviewer.Modes.DOCX_EDITOR,
5 officeEditorOptions: {
6 initialEditMode: WebViewer.InitialEditModes.EDITING, // Default edit mode
7 // initialEditMode: WebViewer.InitialEditModes.REVIEWING, // Enables tracked change editing
8 // initialEditMode: WebViewer.InitialEditModes.VIEW_ONLY', // Enables viewing without document editing
9 // initialEditMode: WebViewer.InitialEditModes.PREVIEW', // Enables view only with accepted tracked changes preview
10 },
11});

Did you find this helpful?

Trial setup questions?

Ask experts on Discord

Need other help?

Contact Support

Pricing or product questions?

Contact Sales