tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
27
pulls
pipelines
add undo/redo to commentbox
awarm.space
6 months ago
daef13e8
d2f41ebb
+5
1 changed file
expand all
collapse all
unified
split
app
lish
[did]
[publication]
[rkey]
Interactions
Comments
CommentBox.tsx
+5
app/lish/[did]/[publication]/[rkey]/Interactions/Comments/CommentBox.tsx
···
7
7
import { Mark, MarkType, Node } from "prosemirror-model";
8
8
import { EditorState, TextSelection } from "prosemirror-state";
9
9
import { EditorView } from "prosemirror-view";
10
10
+
import { history, redo, undo } from "prosemirror-history";
10
11
import {
11
12
MutableRefObject,
12
13
RefObject,
···
54
55
"Meta-i": toggleMark(multiBlockSchema.marks.em),
55
56
"Ctrl-i": toggleMark(multiBlockSchema.marks.em),
56
57
"Ctrl-Meta-x": toggleMark(multiBlockSchema.marks.strikethrough),
58
58
+
"Mod-z": undo,
59
59
+
"Mod-y": redo,
60
60
+
"Shift-Mod-z": redo,
57
61
}),
58
62
keymap(baseKeymap),
59
63
autolink({
···
61
65
shouldAutoLink: () => true,
62
66
defaultProtocol: "https",
63
67
}),
68
68
+
history(),
64
69
],
65
70
}),
66
71
);