Auto format Hyperlinks in cells
Auto format Hyperlinks in cells
Hey Forum,
i am using the TablePress Plugin on a WordPress Installation.
I set up some tables where the last cell in every row (4 columns) contains 2 links (mail & www)
have a look at the setup here: http://dr-scheuernstuhl.de/therapeutinnen/
Right now I have to enter <a href="mailto:mail@mail.com?">E-Mail</a> <a href="http://website.com/target=_blank">Website</a> into all of the cells, which is quite inconvenient.
Is there a way to automatically detect hyperlinks so i can just enter "mail@mail.com" and "www.website.com"?
I'm new to DataTables and have very little knowledge of jquery, unfortunately...
thx in advance,
ary
Answers
You can concatenate the field value with the link when you initialize the table using columns.render:
If you want email and website in one column just render them both:
You can see an example here