preserve reply fallback when editing

This commit is contained in:
Bruno Windels 2019-07-08 15:25:44 +02:00
parent 0347c42798
commit 888e4d1ec2
2 changed files with 94 additions and 48 deletions

View file

@ -33,10 +33,10 @@ export function mdSerialize(model) {
}, "");
}
export function htmlSerializeIfNeeded(model) {
export function htmlSerializeIfNeeded(model, forceHtml = false) {
const md = mdSerialize(model);
const parser = new Markdown(md);
if (!parser.isPlainText()) {
if (!parser.isPlainText() || forceHtml) {
return parser.toHTML();
}
}