mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-07 16:30:49 +00:00
Fix mention paste (#3075)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
1ce134c292
commit
0b3d353e58
@ -49,6 +49,7 @@ export const Completion = Node.create<CompletionOptions>({
|
|||||||
.run()
|
.run()
|
||||||
},
|
},
|
||||||
allow: ({ editor, range }) => {
|
allow: ({ editor, range }) => {
|
||||||
|
if (range.from > editor.state.doc.content.size) return false
|
||||||
const $from = editor.state.doc.resolve(range.from)
|
const $from = editor.state.doc.resolve(range.from)
|
||||||
const type = editor.schema.nodes[this.name]
|
const type = editor.schema.nodes[this.name]
|
||||||
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
||||||
|
Loading…
Reference in New Issue
Block a user