refactoring

This commit is contained in:
Philipp Kühn
2021-05-05 14:14:09 +02:00
parent b5c51723ea
commit 63b4e15b0c

View File

@@ -17,11 +17,16 @@ export const Mention = Node.create<MentionOptions>({
editor editor
.chain() .chain()
.focus() .focus()
.insertContentAt(range, { .insertContentAt(range, [
{
type: 'mention', type: 'mention',
attrs: props, attrs: props,
}) },
.insertContent(' ') {
type: 'text',
text: ' ',
},
])
.run() .run()
}, },
allow: ({ editor, range }) => { allow: ({ editor, range }) => {