Paragraph fragment doesn't display mapped text field's line breaks

Issue

  • We created a structure with a text field and put multiple lines in the web content
  • After that, we added a Paragraph fragment to a page and mapped the web content's text field to it, it displays the multiple-line text in a single line without line breaks

Environment

  • Liferay DXP 7.3+

Resolution

  • The behavior is intended because the Text field in the web content structure restricts the use of \n as a line break, and we want to avoid mixing plain text line style with HTML markup.
  • You should use the Rich text field in your structure, which allows the usage of HTML markup.
Was this article helpful?
0 out of 0 found this helpful