WIP store history as raw content state

Not sure this solves any problems because we still have to convert from md and back
This commit is contained in:
Luke Barnard 2017-07-20 18:01:39 +01:00
parent 26b16b076c
commit 0cc890c020
2 changed files with 22 additions and 23 deletions

View file

@ -762,15 +762,10 @@ export default class MessageComposerInput extends React.Component {
let sendHtmlFn = this.client.sendHtmlMessage;
let sendTextFn = this.client.sendTextMessage;
if (this.state.isRichtextEnabled) {
this.historyManager.addItem(
contentHTML ? contentHTML : contentText,
contentHTML ? 'html' : 'markdown',
);
} else {
// Always store MD input as input history
this.historyManager.addItem(contentText, 'markdown');
}
this.historyManager.save(
contentState,
this.state.isRichtextEnabled ? 'html' : 'markdown',
);
if (contentText.startsWith('/me')) {
contentText = contentText.substring(4);