Skip to content

Commit 9a04d47

Browse files
committed
docs: add try it online link
1 parent 3a7bd30 commit 9a04d47

File tree

5 files changed

+57
-16
lines changed

5 files changed

+57
-16
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- Sync document state with Loro
44
- Sync cursors with Loro's Awareness and [Cursor](https://loro.dev/docs/tutorial/cursor)
55
- Undo/Redo in collaborative editing
6+
- [🎨 Try it online](https://6661e86e215da40180d90507-ansgznbrmy.chromatic.com)
67

78
```ts
89
import {
@@ -22,9 +23,9 @@ const plugins = [
2223
LoroSyncPlugin({ doc }),
2324
LoroUndoPlugin({ doc }),
2425
keymap({
25-
"Mod-z": state => undo(state, () => {}),
26-
"Mod-y": state => redo(state, () => {}),
27-
"Mod-Shift-z": state => redo(state, () => {}),
26+
"Mod-z": (state) => undo(state, () => {}),
27+
"Mod-y": (state) => redo(state, () => {}),
28+
"Mod-Shift-z": (state) => redo(state, () => {}),
2829
}),
2930
LoroCursorPlugin(awareness, {}),
3031
];
@@ -34,6 +35,3 @@ const editor = new EditorView(editorDom, {
3435
```
3536

3637
https://github.com/loro-dev/prosemirror/assets/18425020/d0f01760-b76c-43b5-b7f7-b0b224130d9d
37-
38-
39-

examples/stories/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"dependencies": {
1515
"loro-crdt": "^0.16.3",
16-
"loro-prosemirror": "link:../..",
16+
"loro-prosemirror": "0.0.3",
1717
"prosemirror-commands": "^1.5.2",
1818
"prosemirror-example-setup": "^1.2.2",
1919
"prosemirror-keymap": "^1.2.2",

examples/stories/pnpm-lock.yaml

Lines changed: 35 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"@rollup/plugin-node-resolve": "^15.0.1",
3333
"@typescript-eslint/parser": "^7.4.0",
3434
"@vitest/coverage-v8": "^1.4.0",
35+
"chromatic": "^11.5.3",
3536
"eslint": "^8.57.0",
3637
"lib0": "^0.2.93",
3738
"prettier": "^3.2.5",

pnpm-lock.yaml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)