Hi
Anybody know how to loop through a incomming text file, and mark up all https addresses to hyperlinks ?
Don’t know if the step should be done in datamapper or in the template.
An https address will always be on it own line.
I know how to convert a single line to a hyperlink, if it contains https via a regex.
And quistion number 2, is it possible ot “replace” the https address with a new text “click here” with a hyperlink on it.
Example:
Lorem Ipsum er ganske enkelt fyldtekst fra print- og typografiindustrien.
Lorem Ipsum har været standard fyldtekst siden 1500-tallet.
Lorem Ipsum har ikke alene overlevet fem århundreder.
Sætningen blev gjordt kendt i 1960’erne med lanceringen af Letraset-ark.
{https://dr.dk}
Det er en kendsgerning, at man bliver distraheret af læsbart indhold på en side.
Meningen med at bruge Lorem Ipsum er.
Hello @klaus.soerensen,
It depends on the applied regular expression, but it is possible to achieve this by the Advanced Search and Replace Workflow plugin, for example:
Example
Input:
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut odio. Nam sed est. Nam a risus et est iaculis adipiscing. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer ut justo. https://example.com. In tincidunt viverra nisl. Donec dictum malesuada magna. Curabitur id nibh auctor tellus adipiscing pharetra. Fusce vel justo non orci semper feugiat. Cras eu leo at purus ultrices tristique.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. https://example.com.
https://example.com
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Output:
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut odio. Nam sed est. Nam a risus et est iaculis adipiscing. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer ut justo. [click here](https://example.com). In tincidunt viverra nisl. Donec dictum malesuada magna. Curabitur id nibh auctor tellus adipiscing pharetra. Fusce vel justo non orci semper feugiat. Cras eu leo at purus ultrices tristique.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. [click here](https://example.com).
[click here](https://example.com)
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Thanks it is working in the workflow.
Is there a second way to do it in a template, where I just have the text from a parameter in the datamapper.
There I don’t have the Advanced Search and replace function.
I can make it clickable with a regex, but not with the extra function [Click Here]