javascript - how to create hyperlinks(<a></a>) in a paragraph of string, using Thymeleaf -


i have paragraph of string, contains url words well, :

"hello world, http://thymeleaf.org , https://google.com welcomes you."

while generating pdf, 2 url words should come hyperlinks , rest of text should plain.

@modelattribute("paragrah") public string getparagraph() {     return "hello world, <a href='http://thymeleaf.org'>http://thymeleaf.org</a> , <a href='https://google.com'>https://google.com</a> welcomes you."; } 

html

<p th:text="${paragraph}"/> 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -