csvtotable icon indicating copy to clipboard operation
csvtotable copied to clipboard

Is it possible to add hyperlinks on cells ?

Open freed0nn opened this issue 6 years ago • 2 comments

For example,there is a csv file :

link,title,description,date
http://github.com/1,title1,1,20170815
http://github.com/2,title2,2,20170815
http://github.com/3,title3,3,20170815
http://github.com/4,title4,4,20170814

output should like this:

title description date
title1 1 20170815
title2 2 20170815
title3 3 20170815
title4 4 20170814

freed0nn avatar Aug 16 '17 05:08 freed0nn

Seems bit complicated since there can be any number of such fields in CSV. One simple implementation will be to mark certain row as a link and while rendering it shows as link with generic text like link. I will add this as a feature request for now.

vividvilla avatar Aug 20 '17 12:08 vividvilla

I don't see what is complicated. I think as a first draft have the rederer find text starting with "http" then wrap it in <a href=" prefix and ">link</a> suffix? Seems to me this would work for cells that contain just a URL. (Of course, rare edge cases, like a quote (") in the URL would likely break it.)

BTW, When I edit the csv file and wrap the URL, github refuses to render the csv, saying:

"We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line ..."

(BTW, the beautiful-and-searchable link does not mention anything about "quoting", illegal or not!)

porteusconf avatar Sep 02 '20 14:09 porteusconf