Review tracked changes
Let people propose, inspect, accept, and reject changes in the Editor.
Tracked changes let a person propose an edit without immediately changing the accepted document. The Editor renders each proposal in the DOCX and provides controls for accepting or rejecting it.
Use this page for the human review experience. Use Document API tracked changes when application code needs to create, list, inspect, or decide changes programmatically.
Open the Editor for review
Start in suggesting mode when a reviewer should create new tracked changes while inspecting existing ones. Provide the current user so exported changes retain their author.
Use the same toolbar and Editor containers from Configure the built-in toolbar, then initialize SuperDoc:
import { SuperDoc } from 'superdoc';
import 'superdoc/style.css';
const superdoc = new SuperDoc({
selector: '#editor',
document: '/contract.docx',
documentMode: 'suggesting',
toolbar: '#toolbar',
user: {
name: 'Jordan Lee',
email: '[email protected]',
},
});
window.addEventListener('beforeunload', () => superdoc.destroy());
Copy the tracked-changes fixture to your app's public directory as contract.docx, or update the document URL.
The built-in toolbar reads the active selection and exposes accept or reject actions when a tracked change can be decided. New typing in suggesting mode becomes another proposal.
Try the review flow
The sample opens automatically with one tracked change. Select the change, then accept or reject it.
The sample editor loads as this demo enters view. The rest of the article stays lightweight.
Accept keeps the proposed result and removes the review mark. Reject restores the prior content and removes the review mark. Both decisions change the open document and must be followed by your normal save or export flow.
Choose the right mode
| Reviewer task | Mode | Tracked-change visibility |
|---|---|---|
| Propose edits and decide existing changes | suggesting | Review marks are shown |
| Edit directly while deciding existing changes | editing | Review marks are shown |
| Inspect proposals without changing the document | viewing | Set modules.trackChanges.visible to true |
| Read the document before proposals were accepted | viewing | Leave tracked-change visibility at its default |
Viewing mode is read-only. Showing tracked changes in that mode does not grant permission to accept, reject, or create them.
Keep review decisions explicit
The built-in controls and superdoc/ui use the same tracked-change state. A control can be disabled because there is no active change, the document is read-only, or the current client interaction policy does not allow the decision.
Do not infer the active change from document DOM attributes. Use the built-in controls or the public custom UI controller. Use the Document API when a service or application workflow decides a known change by ID.
Editor modes and client-side review controls are not an authorization boundary. Your application still owns access to the DOCX, trusted user identity, persistence, and collaboration authorization.
Verify the completed workflow by exporting the DOCX and reopening it. Accepted text should remain without a pending review mark. Rejected text should be restored. Unresolved changes should remain available for another reviewer.
Continue with Load and save documents, or build application-owned controls with the Custom UI overview.