Search code examples
grailsgsp

How to display String created in textArea to maintain formatting in Grails?


I'm wondering what's the proper way to display a String, created by user using textArea input field? When using fieldValue everything is in single line :/

Thanks, Krystian


Solution

  • you must place the variable you get from the database into a "pre" tag

    <pre>${variable}</pre>