Hi Hedi,
Could you share me your HTML code of description?
As Andrew suggested, you can insert a line break with "
",
you can replace link break symbol(<br>) by regex.
For example, if actually there are many br tags in email body, then I can do replace job with code below:
openEmail();
function openEmail() {
var body = Xrm.Page.getAttribute("description").getValue();
var subject = "A test email";
window.location.href = "mailto:?body=" parseHTML(body) "&subject=" subject;
}
function parseHTML(htmlCode) {
var text = htmlCode.replace(//gi, "
").replace(/] (>|$)/g, "")
return text;
}


However, the final code would still depends on your HTML source code,
because another possible situation is that your HTML looks like below:
<div>1st Phone call descrption</div>
<div>2st Phone call descrption</div>
etc.
a div element could be equivalent to a line.
Then you should change regex:
function parseHTML(htmlCode) {
//var text = htmlCode.replace(//gi, "
").replace(/] (>|$)/g, "");
var text = htmlCode.replace(//g, "").replace(//g, "
");
return text;
}

Please let me know whether it could helps.
Regards,
Clofly
Was this reply helpful?
Yes
No