Fix mention paste (#3075)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2023-04-25 23:17:28 +07:00
committed by GitHub
parent 1ce134c292
commit 0b3d353e58
+1
View File
@@ -49,6 +49,7 @@ export const Completion = Node.create<CompletionOptions>({
.run()
},
allow: ({ editor, range }) => {
if (range.from > editor.state.doc.content.size) return false
const $from = editor.state.doc.resolve(range.from)
const type = editor.schema.nodes[this.name]
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions