# @atlaskit/editor-plugin-track-changes

> ShowDiff plugin for @atlaskit/editor-core

Latest version **32.0.4** (published 2026-11-19) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @atlaskit/editor-plugin-track-changes
pnpm add @atlaskit/editor-plugin-track-changes
yarn add @atlaskit/editor-plugin-track-changes
bun add @atlaskit/editor-plugin-track-changes
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 32.0.4 |
| Published | 2026-11-19 |
| First published | 2025-07-08 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 11 |
| Unpacked size | 133.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Atlassian Pty Ltd |
| Maintainers | atlassianartifactteam |

## Links

- npm: https://www.npmjs.com/package/@atlaskit/editor-plugin-track-changes
- Repository: https://bitbucket.org/atlassian/atlassian-frontend-mirror
- Homepage: https://bitbucket.org/atlassian/atlassian-frontend-mirror#readme
- Issues: https://bitbucket.org/atlassian/atlassian-frontend-mirror/issues
- npm.io page: https://npm.io/package/@atlaskit/editor-plugin-track-changes

## Dependencies (11)

- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.0.0
- [@atlaskit/button](https://npm.io/package/@atlaskit/button.md) ^25.8.0
- [@atlaskit/editor-toolbar](https://npm.io/package/@atlaskit/editor-toolbar.md) ^2.11.0
- [@atlaskit/editor-prosemirror](https://npm.io/package/@atlaskit/editor-prosemirror.md) ^9.0.0
- [@atlaskit/editor-toolbar-model](https://npm.io/package/@atlaskit/editor-toolbar-model.md) ^1.2.0
- [@atlaskit/editor-plugin-history](https://npm.io/package/@atlaskit/editor-plugin-history.md) 33.0.0
- [@atlaskit/editor-plugin-toolbar](https://npm.io/package/@atlaskit/editor-plugin-toolbar.md) ^30.0.0
- [@atlaskit/platform-feature-flags](https://npm.io/package/@atlaskit/platform-feature-flags.md) ^2.2.0
- [@atlaskit/editor-plugin-show-diff](https://npm.io/package/@atlaskit/editor-plugin-show-diff.md) 33.1.0
- [@atlaskit/platform-feature-experiments](https://npm.io/package/@atlaskit/platform-feature-experiments.md) ^0.3.0
- [@atlaskit/editor-plugin-primary-toolbar](https://npm.io/package/@atlaskit/editor-plugin-primary-toolbar.md) ^34.0.0

## Recent versions

- 32.0.4 (latest) — 2026-11-19
- 32.0.3 — 2026-11-18
- 32.0.2 — 2026-11-17
- 32.0.1 — 2026-11-17
- 32.0.0 — 2026-11-17
- 31.0.0 — 2026-11-17
- 30.0.0 — 2026-11-16
- 29.0.24 — 2026-11-16
- 29.0.23 — 2026-11-13
- 29.0.22 — 2026-11-13
- 29.0.21 — 2026-11-12
- 29.0.20 — 2026-11-11
- 29.0.19 — 2026-11-09
- 29.0.18 — 2026-11-09
- 29.0.17 — 2026-11-07
- … 471 more at https://npm.io/package/@atlaskit/editor-plugin-track-changes/versions

## README

# Editor Plugin Track Changes

Track changes plugin for @atlaskit/editor-core

## Overview

The Track Changes plugin enables tracking and display of document changes in the Atlassian Editor. It integrates with the Show Diff plugin to visualize content modifications and provides commands to toggle the display of changes and reset the baseline for comparison.

## Key features

- **Toggle change display** - Show or hide tracked changes in the editor using the `toggleChanges` command
- **Baseline reset** - Reset the baseline used for tracking changes with the `resetBaseline` command
- **Toolbar integration** - Optionally display a track changes button in the editor toolbar
- **Shared state** - Access the state of change display and diff availability through shared plugin state
- **Show Diff integration** - Works seamlessly with the Show Diff plugin for visual change representation

## Install

- **Install** - `yarn add @atlaskit/editor-plugin-track-changes`
- **npm** - [@atlaskit/editor-plugin-track-changes](https://www.npmjs.com/package/@atlaskit/editor-plugin-track-changes)
- **Source** - [Bitbucket](https://bitbucket.org/atlassian/atlassian-frontend/src/master/packages/editor/editor-plugin-track-changes)
- **Bundle** - [unpkg.com](https://unpkg.com/@atlaskit/editor-plugin-track-changes/dist/)

## Usage

### Import

`import { trackChangesPlugin } from '@atlaskit/editor-plugin-track-changes';`

### Dependencies

**Required:**
- `ShowDiffPlugin` - Required for displaying track changes diff view

**Optional:**
- `PrimaryToolbarPlugin` - Required if using `showOnToolbar: true`
- `ToolbarPlugin` - Alternative toolbar plugin for registering the track changes button

### Configuration

The plugin accepts an optional configuration object:

```typescript
trackChangesPlugin({
  showOnToolbar: true // Shows track changes button in the toolbar (default: false)
})
```

### Example

```typescript
import React from 'react';

import Button from '@atlaskit/button/new';
import { cssMap } from '@atlaskit/css';
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
import { ComposableEditor } from '@atlaskit/editor-core/composable-editor';
import { usePreset } from '@atlaskit/editor-core/use-preset';
import { basePlugin } from '@atlaskit/editor-plugins/base';
import { Box } from '@atlaskit/primitives/compiled';
import { token } from '@atlaskit/tokens';

import { showDiffPlugin } from '@atlaskit/editor-plugin-show-diff';
import { trackChangesPlugin } from '@atlaskit/editor-plugin-track-changes';

const styles = cssMap({
	aboveEditor: {
		paddingTop: token('space.100'),
		paddingBottom: token('space.100'),
	},
	everythingContainer: {
		paddingTop: token('space.200'),
		paddingBottom: token('space.200'),
		paddingLeft: token('space.200'),
		paddingRight: token('space.200'),
	},
});

function Editor() {
	const { preset, editorApi } = usePreset(
		(builder) =>
			builder.add(basePlugin).add(showDiffPlugin).add(trackChangesPlugin),
		[],
	);

	const isSelected = useSharedPluginStateSelector(editorApi, 'trackChanges.isDisplayingChanges');

	return (
		<Box xcss={styles.everythingContainer}>
			<Box xcss={styles.aboveEditor}>
				<Button
					appearance="primary"
					onClick={() => {
						editorApi?.core.actions.execute(
							editorApi?.trackChanges.commands.toggleChanges,
						);
					}}
					isSelected={isSelected}
				>
					Show Diff
				</Button>
			</Box>
			<ComposableEditor preset={preset} />
		</Box>
	);
}

export default Editor;
```

Detailed docs and example usage can be found [here](https://atlaskit.atlassian.com/packages/editor/editor-plugin-track-changes).

## Support

For support, visit the [#help-editor](https://atlassian.slack.com/archives/CFG3PSQ9E) Slack channel or submit an issue via [go/editor-help](https://go/editor-help).

## License

Please see [Atlassian Frontend - License](https://hello.atlassian.net/wiki/spaces/AF/pages/2589099144/Documentation#License) for more licensing information.

---
_Source: https://npm.io/package/@atlaskit/editor-plugin-track-changes · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
