let formatHtml2Text = function (html) {
var text = html;
if (text) {
text = text.replace(/ /g, " ");
text = text.replace(/<br\/>/g, "\n");
}
return text;
};
console.log(formatHtml2Text("<div>和换<br/>行 符</div>"))