also prevent merge/skip on rich text pastes

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2018-07-18 11:00:45 +01:00
parent 1a9de3fabe
commit 3e956514b3
No known key found for this signature in database
GPG key ID: 3F879DA5AD802A5E

View file

@ -980,9 +980,15 @@ export default class MessageComposerInput extends React.Component {
// that we will silently discard nested blocks (e.g. nested lists) :(
const fragment = this.html.deserialize(transfer.html);
if (this.state.isRichTextEnabled) {
return change.insertFragment(fragment.document);
return change
.setOperationFlag("skip", false)
.setOperationFlag("merge", false)
.insertFragment(fragment.document);
} else {
return change.insertText(this.md.serialize(fragment));
return change
.setOperationFlag("skip", false)
.setOperationFlag("merge", false)
.insertText(this.md.serialize(fragment));
}
}
case 'text':