var bodyValue = ctx.CurrentItem[ctx.CurrentFieldSchema.Name];
//This regex expression is used to delete html tags from the
Body field
var regex = /(<([^>]+)>)/ig;
bodyValue = bodyValue.replace(regex, "");
var newBodyValue = bodyValue;
if (bodyValue && bodyValue.length >= 100)
{
newBodyValue = bodyValue.substring(0, 100) + "
...";
}
return "<span title='" + bodyValue +
"'>" + newBodyValue + "</span>";
No comments:
Post a Comment