I am trying to programmatically modify header text/color/style using a custom formatter. I looked at the question Tabulator - Having Column Header Resize when Font Size Changes which was nearly perfect, but the example formatter given looks like a cell formatter not a header title formatter.
A cell formatter takes three parameters whereas a header title formatter takes none. (I believe - and the docs seem to agree: http://tabulator.info/docs/4.2/format#format-column)
My question is simply "Is there any way for a header title formatter to determine which column it is in?"
If I'm wrong about the parameters, then that should help, but I use the exact format as given in the other answer but modify the code to
var customFormatter = function(cell, formatterParams, onRendered){
alert(cell == undefined)
}
and the browser returns 'true'. So it is being run as I get the alert, but no parameters. Which agrees with the docs.
My alternative, as I'm creating the many tabulators programmatically in php, is to create a different function for every column in every table. But that seems like a terrible solution.