Carriage returns not shown in document template

0
I wonder if someone has ran into this also. I've got some pages in my app with text boxes. In here content is entered with returns in the text. When I display these fields in a document template, the returns disappear and the lines are all printed right after each other. I've debugged the proces from entering the values until showing the values in the document template. I can see that the returns are present in the object. Even in the database the returns are present in the field.   
asked
2 answers
0

Are you using a normal text box as input? Maybe try using the rich text or cke editor, these editors generate HTML. This should work with the document template.

answered
0

Hi Chris,

in a document template I would use a template grid instead of a data grid (you can make it look like a datagrid using a separate table containing the column headings above the template grid. If you add the table with the column names in the actual header section of a template it will even be repeated on every page as a bonus.

However, you can still achieve the intended result in a datagrid by defining custom styling. Go to the data grid cell of the column where the data is not properly broken into text. Open properties, and add the following in the “Custom Styles” section:

white-space: pre;

This will preserve line breaks and display the value as it would in a text box on a desktop page.

 

 

answered