Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit ecef9cf

Browse files
author
Luke Barnard
committed
Use plaintext when loading a markdown history item into RT mode
1 parent 6b1b643 commit ecef9cf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/ComposerHistoryManager.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,11 @@ class HistoryItem {
3838
const contentState = convertFromRaw(this.rawContentState);
3939
if (outputFormat === 'markdown') {
4040
if (this.format === 'html') {
41-
console.info(outputFormat, 'to other format');
4241
return ContentState.createFromText(RichText.stateToMarkdown(contentState));
4342
}
4443
} else {
4544
if (this.format === 'markdown') {
46-
console.info(outputFormat, 'to other format');
47-
return RichText.htmlToContentState(new Markdown(contentState).toHTML());
45+
return RichText.htmlToContentState(new Markdown(contentState.getPlainText()).toHTML());
4846
}
4947
}
5048
// history item has format === outputFormat

0 commit comments

Comments
 (0)