fix: Unable to insert text into a table cell (#702)

fix#670
This commit is contained in:
Ran Luo 2019-03-02 18:44:14 +08:00 committed by Felix Häusler
parent 4647a53111
commit 437e0b0951

View File

@ -166,7 +166,7 @@ const pasteCtrl = ContentState => {
if (/th|td/.test(startBlock.type)) {
const pendingText = text.trim().replace(/\n/g, '<br/>')
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 = {