From cd505ab677a1d80b6585c45702adbb66ae8cc35e Mon Sep 17 00:00:00 2001 From: Nulo Date: Fri, 21 Apr 2023 17:52:48 -0300 Subject: [PATCH] enable history plugin --- src/editor/Editor.svelte | 7 ++++--- src/editor/keymap.ts | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/editor/Editor.svelte b/src/editor/Editor.svelte index 6b855e8..ed86696 100644 --- a/src/editor/Editor.svelte +++ b/src/editor/Editor.svelte @@ -4,8 +4,9 @@ import { EditorView } from "prosemirror-view"; import { dropCursor } from "prosemirror-dropcursor"; import { gapCursor } from "prosemirror-gapcursor"; + import { history } from "prosemirror-history"; import type { XmlFragment } from "yjs"; - import { ySyncPlugin, yUndoPlugin } from "y-prosemirror"; + import { ySyncPlugin } from "y-prosemirror"; import "./editor.css"; @@ -45,10 +46,10 @@ dropCursor(), gapCursor(), //menubar(schema), - // history(), + history(), ySyncPlugin(doc), // yCursorPlugin(doc.webrtcProvider.awareness), - yUndoPlugin(), + // yUndoPlugin(), keymap(baseKeymap), // placeholderPlugin, ], diff --git a/src/editor/keymap.ts b/src/editor/keymap.ts index b0a6ef3..d55e9f6 100644 --- a/src/editor/keymap.ts +++ b/src/editor/keymap.ts @@ -14,7 +14,7 @@ import { selectNodeForward, splitBlock, } from "prosemirror-commands"; -import { undo, redo } from "y-prosemirror"; +import { undo, redo } from "prosemirror-history"; import { splitListItem, liftListItem,