1
0

fix(editor): add missing dependencies for commands

This commit is contained in:
kolaente
2023-10-21 11:46:02 +02:00
parent aea3f86a8f
commit 3bf806f00c
5 changed files with 31 additions and 0 deletions

View File

@ -46,6 +46,9 @@ import CharacterCount from '@tiptap/extension-character-count'
import StarterKit from '@tiptap/starter-kit'
import {EditorContent, useEditor, VueNodeViewRenderer} from '@tiptap/vue-3'
import Commands from './commands'
import suggestion from './suggestion'
// load all highlight.js languages
import {lowlight} from 'lowlight'
@ -199,6 +202,10 @@ const editor = useEditor({
// return VueNodeViewRenderer(CodeBlock)
// },
// }).configure({ lowlight }),
Commands.configure({
suggestion,
}),
],
onUpdate: () => {
// HTML

View File

@ -1,6 +1,8 @@
import { Extension } from '@tiptap/core'
import Suggestion from '@tiptap/suggestion'
// Copied and adjusted from https://github.com/ueberdosis/tiptap/tree/252acb32d27a0f9af14813eeed83d8a50059a43a/demos/src/Experiments/Commands/Vue
export default Extension.create({
name: 'commands',