This commit is contained in:
Luke Barnard 2017-06-23 17:35:07 +01:00
parent 004d4828f8
commit 89afcfd897
7 changed files with 23 additions and 17 deletions

View file

@ -21,14 +21,14 @@ class HistoryItem {
let {message} = this;
if (format === 'markdown') {
if (this.format === 'html') {
message = _flow([RichText.HTMLtoContentState, RichText.stateToMarkdown])(message);
message = _flow([RichText.htmlToContentState, RichText.stateToMarkdown])(message);
}
return ContentState.createFromText(message);
} else {
if (this.format === 'markdown') {
message = new Markdown(message).toHTML();
}
return RichText.HTMLtoContentState(message);
return RichText.htmlToContentState(message);
}
}
}