I have a database table with a description Text field which has data with line breaks.
How can I preserve these line breaks when dynamically displaying the field on the App structure.
The field data has no html, its plane text with line breaks.
I’ve tried a dynamic attribute Innet HTML by obviously that doesn’t work.
Just wondering if there is a quick way of achieving this?
Using inner HTML will properly render any HTML content from your database.
I see you are not properly using it, if you are using the inner HTML option your code should look like:
<p dmx-html="your_value"></p>
not
<p dmx-html="your_value">{{your_value}}</p>
it’s either the inner html or the direct binding in {{ }}, never both.
What is the value returned by your server action when you load the page? Please post a screenshot of what you see for it from the Network > XHR tab of your browser dev tools.