From 63b4e15b0cf203c05719df7ec6e1c77d802fc10c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Wed, 5 May 2021 14:14:09 +0200 Subject: [PATCH] refactoring --- packages/extension-mention/src/mention.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/extension-mention/src/mention.ts b/packages/extension-mention/src/mention.ts index 8e4ed9ca..513fd835 100644 --- a/packages/extension-mention/src/mention.ts +++ b/packages/extension-mention/src/mention.ts @@ -17,11 +17,16 @@ export const Mention = Node.create({ editor .chain() .focus() - .insertContentAt(range, { - type: 'mention', - attrs: props, - }) - .insertContent(' ') + .insertContentAt(range, [ + { + type: 'mention', + attrs: props, + }, + { + type: 'text', + text: ' ', + }, + ]) .run() }, allow: ({ editor, range }) => {