How to remove hyperLink label
How to remove hyperLink label
mhabeb
Posts: 1Questions: 1Answers: 0
Link to test case:
Debugger code (debug.datatables.net):
$(document).ready(function() {
$('#myTable').DataTable({
columnDefs: [ {
targets: 2,
render: DataTable.render.hyperLink()
} ],
dom: 'Blfrtip', //DOM elements https://datatables.net/reference/option/dom
buttons: [
'copyHtml5',
'excelHtml5',
'csvHtml5',
'pdfHtml5',
{
text: 'JSON',
action: function ( e, dt, button, config ) {
var data = dt.buttons.exportData();
$.fn.dataTable.fileSave(
new Blob( [ JSON.stringify( data ) ] ),
'Export.json'
);
}
}
],
pageLength: 15,
lengthMenu: [ 10, 15, 20, 25, 50, 75, 100 ],
responsive: true
});
});
Error messages shown:
Description of problem:
I have columns in my table that include URLs and I would like to make these urls hyperlinked without giving it custom label. when i apply the options above I still get Click here label. How can I make the url hyperlinked without any label?
Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
Answers
You can use
columns.render
for that - just reformat the URL into how you want it. There's an example similar to that on the reference page.Colin