// Start tracking superdoc.setDocumentMode('suggesting');
// Switch modes (controls tracking) superdoc.setDocumentMode('suggesting'); // Enable tracking superdoc.setDocumentMode('editing'); // Disable tracking // 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, '[email protected]' ); // 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?