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
.chain()
.focus()
.insertContentAt(range, {
type: 'mention',
attrs: props,
})
.insertContent(' ')
.insertContentAt(range, [
{
type: 'mention',
attrs: props,
},
{
type: 'text',
text: ' ',
},
])
.run()
},
allow: ({ editor, range }) => {