a tool for shared writing and social publishing

add undo/redo to commentbox

+5
+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 + 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 + "Mod-z": undo, 59 + "Mod-y": redo, 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 + history(), 64 69 ], 65 70 }), 66 71 );