From bdefb35c64518dfae7c51302c0df29d25033f962 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 6 Jul 2017 11:52:02 +0100 Subject: [PATCH] Only insert HTML into the composer in RTE mode If MD mode is enabled, paste the plaintext equivalent. --- src/components/views/rooms/MessageComposerInput.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/views/rooms/MessageComposerInput.js b/src/components/views/rooms/MessageComposerInput.js index 83e717d55d..80fdf470e3 100644 --- a/src/components/views/rooms/MessageComposerInput.js +++ b/src/components/views/rooms/MessageComposerInput.js @@ -488,8 +488,7 @@ export default class MessageComposerInput extends React.Component { const currentContent = this.state.editorState.getCurrentContent(); let contentState = null; - - if (html) { + if (html && this.state.isRichtextEnabled) { contentState = Modifier.replaceWithFragment( currentContent, currentSelection,