Skip to content

Commit b34b8fe

Browse files
completion the feature
0 parents  commit b34b8fe

8 files changed

+4215
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

.vscode/settings.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"cSpell.words": [
3+
"compositionstart",
4+
"compositionupdate",
5+
"tiptap",
6+
"trackchange"
7+
]
8+
}

README.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# TrackChangeExtension
2+
3+
A Track Change extension for Tiptap.
4+
5+
6+
## Installation
7+
8+
```bash
9+
npm install track-change-extension
10+
```
11+
12+
or just copy the ts file to your project. it depends on the @tiptap/pm package to use ProseMirror api.
13+
14+
## Usage
15+
16+
```javascript
17+
18+
19+
extensions: [
20+
...OtherTiptapExtensions,
21+
TrackChangeExtension.configure({
22+
enabled: true,
23+
onStatusChange (status: boolean) {
24+
myTrackChangeEnabled = status
25+
}
26+
}),
27+
]
28+
29+
// commands
30+
31+
editor.commands.acceptChange()
32+
33+
34+
```
35+
36+
## style
37+
38+
```css
39+
insertion {
40+
color: green;
41+
}
42+
deletion {
43+
color: red;
44+
}
45+
```
46+
47+
###### Enjoy it...

0 commit comments

Comments
 (0)