refactoring

This commit is contained in:
Philipp Kühn
2021-01-18 23:41:38 +01:00
parent 06728824ad
commit aaa0832883
6 changed files with 64 additions and 45 deletions

View File

@@ -8,7 +8,7 @@ export const Mention = Node.create({
defaultOptions: <MentionOptions>{
char: '@',
renderer: () => ({}),
render: () => ({}),
},
group: 'inline',
@@ -47,6 +47,13 @@ export const Mention = Node.create({
Suggestion({
editor: this.editor,
...this.options,
command: ({ range }) => {
this.editor
.chain()
.replace(range, 'mention')
.insertText(' ')
.run()
},
}),
]
},