0

Is there any way to add html in calculated column of a list in SharePoint 2013?

1

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;
    }
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.