![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6oHuQuxRkSAHZUOymcqUGsqN-Z-Zg4C4G4oGYf62ZEDkMuzzn5qhTxSmXY9_0CmVc3cd9tJPfmFYAVh1RQM6foDv-IuDAtqOnPDbEcEh6Wc_sWm7CWXDyRCN9FFqMbYU6twRgiycLXpA/s1600/e-mail.png)
If is necessary to remove the html formatting to display only plain text, the following code can be used:
function StripHTML(html) { return html.replace(/<[^>]*>?/g, ""); } // example var description = Xrm.Page.getAttribute("description").getValue(); var plaintext = StripHTML(description); Xrm.Page.getAttribute("description").setValue(plaintext);
Thanks for this great bit of code. Very clean
ReplyDelete