// Start tracking superdoc.setDocumentMode('suggesting'); // Or via module modules: { trackChanges: { enabled: true } }
// Control tracking editor.commands.trackChanges(true); // Enable editor.commands.trackChanges(false); // Disable // Review changes editor.commands.acceptChange(); editor.commands.rejectChange(); editor.commands.acceptAllChanges(); editor.commands.rejectAllChanges(); // Navigate editor.commands.goToNextChange(); editor.commands.goToPreviousChange(); // View modes editor.commands.toggleTrackChangesShowOriginal(); editor.commands.toggleTrackChangesShowFinal();
import { trackChangesHelpers } from '@harbour-enterprises/superdoc'; // Get all changes const changes = trackChangesHelpers.getAllChanges(editor.state); // Filter by user const userChanges = trackChangesHelpers.getChangesByUser( editor.state, 'john@company.com' ); // Check state const isTracking = trackChangesHelpers.isTrackingEnabled(editor.state);
// With changes await superdoc.export(); // Accept all first editor.commands.acceptAllChanges(); await superdoc.export();
Was this page helpful?