From 22b83f34f37e1a3d530600aed49bc034926a1a28 Mon Sep 17 00:00:00 2001 From: thousandsofraccoons Date: Mon, 14 Nov 2022 17:26:41 +0700 Subject: [PATCH] add history extension --- admin/src/components/Wysiwyg/index.js | 2 ++ package.json | 1 + 2 files changed, 3 insertions(+) diff --git a/admin/src/components/Wysiwyg/index.js b/admin/src/components/Wysiwyg/index.js index 5adf98c..c7f5530 100644 --- a/admin/src/components/Wysiwyg/index.js +++ b/admin/src/components/Wysiwyg/index.js @@ -34,6 +34,7 @@ import OrderedListExtension from "@tiptap/extension-ordered-list" import BulletListExtension from '@tiptap/extension-bullet-list' import ListItemExtension from '@tiptap/extension-list-item' import GapcursorExtension from '@tiptap/extension-gapcursor' +import History from '@tiptap/extension-history' import BlockquoteExtension from '@tiptap/extension-blockquote' import CodeBlockExtension from '@tiptap/extension-code-block' import DocumentExtension from '@tiptap/extension-document' @@ -198,6 +199,7 @@ const WysiwygContent = ({ name, onChange, value, intlLabel, labelAction, disable settings.youtube.enabled ? YouTubeExtension.configure({ inline: false, }) : null, + History ], parseOptions: { preserveWhitespace: 'full', diff --git a/package.json b/package.json index b2f4923..c865ecd 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "@tiptap/extension-gapcursor": "2.0.0-beta.199", "@tiptap/extension-hard-break": "2.0.0-beta.199", "@tiptap/extension-heading": "2.0.0-beta.199", + "@tiptap/extension-history": "^2.0.0-beta.202", "@tiptap/extension-horizontal-rule": "2.0.0-beta.199", "@tiptap/extension-image": "2.0.0-beta.199", "@tiptap/extension-italic": "2.0.0-beta.199",