Is there any way to add html in calculated column of a list in SharePoint 2013?
1 Answer
I found this solution:
$(document).ready(function() {
var theTDs = document.getElementsByTagName("td");
var i=0;
var TDContent = " ";
while (i < theTDs.length) {
try {
TDContent = theTDs[i].innerText || theTDs[i].textContent;
if ((TDContent.indexOf("<div") == 0) && (TDContent.indexOf("</div>") >= 0)) {
theTDs[i].innerHTML = TDContent;
}
}
catch(err){}
i=i+1;
}
});