refactoring
This commit is contained in:
@@ -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 }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user