Reputation: 133
I need to make links in the generated files by tabulator clickable. I use https://github.com/olifolkerd/tabulator and for downloading the provided approach from here http://tabulator.info/docs/4.0/download. Everything works fine – but in neither the Excel nor the pdf (or the csv) links are recognized by Libre Office / Acrobat Reader. The links come as http://localhost/test2cpt/eius-impedit-non-aut-ipsum/ for example.
I also tried to provide <a href=link
… from the server and telling tabulator it should render the content as html, not as link, but this also does not work for Excel and pdf.
Hope you can help!
This is part of what my server generates as js (I removed confidential information):
var posts_table = new Tabulator("#posts_table", {
"height": "80%",
"locale": "de-at",
"langs":{/*…*/},
"persistentLayout": true,
"columns": [
/* { … } */
{
"title": "Datum",
"field": "date",
"formatter": "datetime",
"headerFilter": true,
"headerSort": true
}, {
"title": "Status",
"field": "status",
"formatter": "plaintext",
"headerFilter": true,
"headerSort": true
},
/* { … } */
{
"title": "Link",
"field": "link",
"formatter": "link",
"headerFilter": true,
"headerSort": true
},
/*{…}*/
],
"ajaxURL": ''/* Can not provide this here :-) */,
"ajaxParams": {
/* Can not provide this here :-) */
},
"ajaxFiltering": true,
"ajaxSorting": true,
"pagination": "remote",
"paginationSize": 10,
});
the download function goes like this:
var xxx_download_button = jQuery('#submit_download');
xxx_download_button.click(function (event) {
event.preventDefault();
var xxx_selected_download = jQuery('select#download_data option:selected').val();
posts_table.download(xxx_selected_download, 'data.' + xxx_selected_download);
});
With the options csv, pdf and excel -> this all works fine.
And this are the cdn frameworks I am using:
Do others have not had this problem?
Upvotes: 0
Views: 648
Reputation: 8368
All data is rendered in plain text in downloaders. If you want to add this functionality you would need to extend the download module with a Custom Downloader
You could use the source code of one of the existing Downloaders as a starting point
Upvotes: 0