diff --git a/src/muya/lib/contentState/pasteCtrl.js b/src/muya/lib/contentState/pasteCtrl.js index 430a1860..487053f6 100644 --- a/src/muya/lib/contentState/pasteCtrl.js +++ b/src/muya/lib/contentState/pasteCtrl.js @@ -166,7 +166,7 @@ const pasteCtrl = ContentState => { if (/th|td/.test(startBlock.type)) { const pendingText = text.trim().replace(/\n/g, '
') - startBlock.text += pendingText + startBlock.text = startBlock.text.substring(0, start.offset) + pendingText + startBlock.text.substring(end.offset) const { key } = startBlock const offset = start.offset + pendingText.length this.cursor = {