I'm trying to append a path to a cell value inside of Tabulator v3.2 ( http://tabulator.info/docs/3.2 ) that gets pulled from a mySQL table and then display that image represented by the full image path in the Tabulator cell. I have this in the attributes for the .tabulator call:
formatter: function(cell, formatterParams) {
var celli=cell.getValue();
if ((celli.indexOf("blankimg") == -1) && (messages["custimgpath"] != "")) {
var cellf = messages["custimgpath"] + celli + ",\"image\""
}
else {
var cellf = celli
}
return cellf;
}
As you can see I tried to set the format to 'image' w/in the function. The variables in the if statement do resolve to true. Currently it just enters the full path + formatter in the cell, instead of generating the image tag and putting it in src.
How do I modify it to insert the full path in image tag and also set the formatter to image?