make current replaceText command compatible with the previous one

This commit is contained in:
Priestch
2020-10-20 23:49:19 +08:00
committed by Hans Pagel
parent a6da24a75d
commit 38ea4e6c66
2 changed files with 6 additions and 4 deletions

View File

@@ -31,8 +31,8 @@ export default class Mention extends Node {
insertMention(range, attrs, schema) {
const nodeType = schema.nodes[this.name]
const content = nodeType.create(attrs, this.createFragment(schema, attrs.label))
return replaceText(range, nodeType, content)
const nodeFragment = this.createFragment(schema, attrs.label)
return replaceText(range, nodeType, attrs, nodeFragment)
}
get schema() {