remove replaceRange from mention node

This commit is contained in:
Philipp Kühn
2021-05-05 13:49:32 +02:00
parent ec838a11f2
commit 63902d4bdb
2 changed files with 7 additions and 4 deletions

View File

@@ -26,8 +26,8 @@ export const insertContentAt: RawCommands['insertContentAt'] = (range, value) =>
return true
}
if (!tr.selection.empty) {
tr.deleteRange(range.from, range.to)
if (range.from !== range.to) {
tr.delete(range.from, range.to)
}
tr.insert(range.from, content)