Configure the Editor
Set how the Editor starts, then find the configuration options your integration needs.
Continue with the /sample.docx project from the Quickstart. Add a current user and choose how the
Editor starts.
Set the startup configuration
Add the matching import and startupOptions object at the top of your Quickstart file: src/main.ts in Vanilla or
src/App.tsx in React, outside the component. These options name the author and start the Editor in suggesting mode:
import type { Config } from 'superdoc';
export const startupOptions = {
documentMode: 'suggesting',
user: {
name: 'Jordan Lee',
email: '[email protected]',
},
} satisfies Partial<Config>;
In Vanilla, spread startupOptions into the object passed to new SuperDoc(). In React, spread it onto
SuperDocEditor as {...startupOptions}. Keep the callbacks and export code from Quickstart.
Reload the application and change September 1, 2026 to October 1, 2026. The edit should appear as a tracked change
instead of replacing the date directly.
The user value identifies the author of the tracked change. This example uses a fixed user so it runs without
authentication. satisfies checks the field names and values during typechecking.
Set the user
In your application, set user from the signed-in person and give it a non-empty name. If you omit user, or give
it no name (left out, null, undefined, or blank), SuperDoc uses
{ id: null, name: 'Default SuperDoc user', email: null } and keeps any other fields you passed.
SuperDoc then credits new comments, replies, resolved comments, and tracked changes to Default SuperDoc user. Other
people in a collaboration room see that name on those comments and changes. Their built-in cursor label shows your
email instead, or Anonymous without one. An exported DOCX stores the name as the author of comments and tracked
changes. The DOCX does not store who resolved a comment.
Give each person their own email, or their own name if you don't set emails. People who share an email, or who share a name and have no email, count as one author of tracked changes.
Find an option
Choose a group, then choose a field. Each entry shows what it changes, its type, and its default. Some fields link to a guide with a complete example. Expand API details for the generated description.
selectorChoose the element where the Editor mounts.
API details
The selector or element to mount the SuperDoc into.
69 fields · generated from Config
Use Interaction and permissions to choose between instance capabilities, per-action client checks, and trusted backend authorization.
Update a running Editor
Configuration sets the starting state. After onReady, use a runtime method when a value needs to change.
| Change | Runtime method |
|---|---|
| Open a DOCX | replaceFile() |
| Switch modes | setDocumentMode() |
| Change zoom | setZoom() or setZoomMode() |
Changing the object passed to new SuperDoc() does not update a running Vanilla instance. In React, documentMode
updates as a prop. Access other runtime methods through editorRef.current?.getInstance(). If a Vanilla setting has no
runtime method, call destroy() on the current instance before creating its replacement. In React, remount
SuperDocEditor by changing its key; the wrapper destroys the old instance.
Keep React configuration objects such as user and ui outside the component or memoize them. Changing their object
identity recreates the Editor; changing documentMode does not.
Continue to document modes
Compare editing, suggesting, and viewing, then choose what viewers see when a document has comments or tracked changes.
For deployment-specific settings, choose Telemetry or License.