diff --git a/packages/tiptap-extensions/src/nodes/Mention.js b/packages/tiptap-extensions/src/nodes/Mention.js index 53770430..0d89251f 100644 --- a/packages/tiptap-extensions/src/nodes/Mention.js +++ b/packages/tiptap-extensions/src/nodes/Mention.js @@ -52,13 +52,13 @@ export default class Mention extends Node { } commands({ schema }) { - return attrs => replaceText(null, schema.nodes.mention, attrs) + return attrs => replaceText(null, schema.nodes[this.name], attrs) } get plugins() { return [ SuggestionsPlugin({ - command: ({ range, attrs, schema }) => replaceText(range, schema.nodes.mention, attrs), + command: ({ range, attrs, schema }) => replaceText(range, schema.nodes[this.name], attrs), appendText: ' ', matcher: this.options.matcher, items: this.options.items,