dont return tr in input rules and pasterules
This commit is contained in:
@@ -64,8 +64,6 @@ export function markInputRule(config: {
|
||||
|
||||
tr.removeStoredMark(config.type)
|
||||
}
|
||||
|
||||
return tr
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -45,8 +45,6 @@ export function nodeInputRule(config: {
|
||||
} else if (match[0]) {
|
||||
tr.replaceWith(start, end, config.type.create(attributes))
|
||||
}
|
||||
|
||||
return tr
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -29,11 +29,7 @@ export function textInputRule(config: {
|
||||
}
|
||||
}
|
||||
|
||||
const { tr } = state
|
||||
|
||||
tr.insertText(insert, start, end)
|
||||
|
||||
return tr
|
||||
state.tr.insertText(insert, start, end)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -29,12 +29,9 @@ export function textblockTypeInputRule(config: {
|
||||
return null
|
||||
}
|
||||
|
||||
const { tr } = state
|
||||
|
||||
tr.delete(range.from, range.to)
|
||||
state.tr
|
||||
.delete(range.from, range.to)
|
||||
.setBlockType(range.from, range.from, config.type, attributes)
|
||||
|
||||
return tr
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -54,8 +54,6 @@ export function wrappingInputRule(config: {
|
||||
) {
|
||||
tr.join(range.from - 1)
|
||||
}
|
||||
|
||||
return tr
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user