Hey @cemmons
At the moment you cant do that with the existing link formatter, but i think that is a great idea so i will add it to the roadmap for the next release.
in the mean time here is a customised version of the link formatter you could use to do just that:
//clickable anchor tag
var linkFormatter = function(cell, formatterParams){
var value = this.sanitizeHTML(cell.getValue()),
urlPrefix = formatterParams.urlPrefix || "",
label = this.emptyToSpace(value),
data;
if(formatterParams.labelField){
data = cell.getData();
label = data[formatterParams.labelField];
}
if(formatterParams.label){
switch(typeof formatterParams.label){
case "string":
label = formatterParams.label;
break;
case "function":
label = formatterParams.label(cell);
break;
}
}
if(formatterParams.urlField){
data = cell.getData();
value = data[formatterParams.urlField];
}
if(formatterParams.url){
switch(typeof formatterParams.url){
case "string":
value = formatterParams.url;
break;
case "function":
value = formatterParams.url(cell);
break;
}
}
return "<a href='" + urlPrefix + value + "' target='_blank'>" + label + "</a>";
},
I hope that helps,
Cheers
Oli :)
Most helpful comment
Hey @cemmons
At the moment you cant do that with the existing link formatter, but i think that is a great idea so i will add it to the roadmap for the next release.
in the mean time here is a customised version of the link formatter you could use to do just that:
I hope that helps,
Cheers
Oli :)