Documentation Index
Fetch the complete documentation index at: https://docs.superdoc.dev/llms.txt
Use this file to discover all available pages before exploring further.
useSuperDocTrackChanges() exposes the live tracked-change list in document order. Accept, reject, accept-all, reject-all, scroll-to, and next / previous navigation route through editor.doc.trackChanges.* underneath.
A live list of changes
items mirrors editor.doc.trackChanges.list(). Each item carries id plus the full change record (type, author, excerpt, address).
Accept and reject
Navigate
next and previous walk the list in document order. They wrap. scrollTo scrolls the editor viewport to the change’s anchor and sets it as the active id.
Independent vs paired replacements
A typed-over selection in Suggest mode produces an insertion AND a deletion. Default'paired' mode collapses them into one tracked-change entity (accept once, both apply). Independent mode gives each half its own id.
Highlight the active card
The selection slice exposesactiveChangeIds. Use it to highlight the card matching the cursor.
What the snapshot looks like
| Field | Type | Meaning |
|---|---|---|
items | TrackChangesItem[] | Tracked changes in document order. |
total | number | Convenience count of items.length. |
activeId | string | null | Active change driven by selection or by next / previous / scrollTo. |
TrackChangesItem is { id, change }. The change shape mirrors editor.doc.trackChanges.list(): type, author, authorEmail, excerpt, address, etc.
Trade-offs
acceptAllandrejectAllapply across every story. To scope to body only, callaccept/rejectper id.- Tracked changes in headers, footers, and footnotes route correctly through
scrollTo. Non-body entities snap to view (story activation mounts the surface synchronously before alignment); body entities scroll smoothly. - The merged Activity feed pattern is consumer-owned. The controller stays minimal so apps that only render tracked changes don’t pay for comment merging, and apps that want an Activity panel decide their own ordering rules.

