Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Stylized Text Box - Ignoring line breaks from text value

FP1234
Tera Contributor

Hi,


Apologies, I'm just starting out on UI Builder and have run into a hurdle. I have a text value (e.g. Business Application short_description) that we use line breaks in but when it displays in a stylised text box it ignores the line breaks.

For example, the value in Business Application view form displays as:

Overview:
--------------
ACME rocket system is a vendor-delivered SaaS solution used to track and manage Rocket build and launch events and associated activities, including Incidents, Investigations, Corrective Actions, Hazards, Inspections, Audits, Operational Risk Management, Safety Observations and assorted Safety Communications Management

Design:
--------------
The ACME solution:
- Is a SaaS solution hosted on the boggle Cloud platform.
- Is a configured with no custom development.

 

And in the stylized text box, it displays as:

Overview: -------------- ACME rocket system is a vendor-delivered SaaS solution used to track and manage Rocket build and launch events and associated activities, including Incidents, Investigations, Corrective Actions, Hazards, Inspections, Audits, Operational Risk Management, Safety Observations and assorted Safety Communications Management Design: -------------- The ACME solution: - Is a SaaS solution hosted on the boggle Cloud platform. - Is a configured with no custom development.

 

I've also tried with a Rich Text box and it's doing the same.


Any point in the right direction would be appreciated!

1 REPLY 1

FP1234
Tera Contributor

Eventually answered my own question. Just needed to add white-space: pre-line; to the CSS for the stylized text box and displayed as required.