Open laxmanp opened 8 years ago
Convert your HTML to Text and then display it.
Create a formatter that just takes the data text and returns it. Then pass the formatter in that column definition.
The default formatter is:
function defaultFormatter(row, cell, value, columnDef, dataContext) {
if (value == null) {
return "";
} else {
return (value + "").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");
}
}
which has limited HTML escaping. Just change the last return to: return value;
to return the HTML as-is.
Hello sir,
I want to display html text as plain text in grid column, so how to display.