You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Only insert HTML into the composer in RTE mode
If MD mode is enabled, paste the plaintext equivalent.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user