feat(tiptap): add undo and redo (#944)
This commit is contained in:
parent
62b6020895
commit
7c651d450d
3 changed files with 21 additions and 26 deletions
|
@ -8,6 +8,7 @@ import HardBreak from '@tiptap/extension-hard-break'
|
|||
import Bold from '@tiptap/extension-bold'
|
||||
import Italic from '@tiptap/extension-italic'
|
||||
import Code from '@tiptap/extension-code'
|
||||
import History from '@tiptap/extension-history'
|
||||
import { Plugin } from 'prosemirror-state'
|
||||
|
||||
import type { Ref } from 'vue'
|
||||
|
@ -61,6 +62,9 @@ export function useTiptap(options: UseTiptapOptions) {
|
|||
placeholder: () => placeholder.value!,
|
||||
}),
|
||||
CodeBlockShiki,
|
||||
History.configure({
|
||||
depth: 10,
|
||||
}),
|
||||
Extension.create({
|
||||
name: 'api',
|
||||
addKeyboardShortcuts() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue