On reply, put space instead of \n after mention
This commit is contained in:
parent
d2be20f190
commit
d8cfb902a2
|
@ -495,13 +495,17 @@ export function CommentInputTextArea(props: {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
// insert at mention
|
// insert at mention and focus
|
||||||
if (replyToUser) {
|
if (replyToUser) {
|
||||||
editor.commands.insertContentAt(0, {
|
editor
|
||||||
type: 'mention',
|
.chain()
|
||||||
attrs: { label: replyToUser.username, id: replyToUser.id },
|
.setContent({
|
||||||
})
|
type: 'mention',
|
||||||
editor.commands.focus()
|
attrs: { label: replyToUser.username, id: replyToUser.id },
|
||||||
|
})
|
||||||
|
.insertContent(' ')
|
||||||
|
.focus()
|
||||||
|
.run()
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [editor])
|
}, [editor])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user