Use Javascript to put line break in Text element in Connect Designer

Hello,

I’m trying to use Javascript to put line breaks in a Text element in Connect Designer, unfortunately the line break characters are ignored in the output (see below).

image

I’m thinking the issue is the Text Formatting/Spacing/Whitespace setting (see below) but I tried each Whitespace setting and the output is not predictable.

image

Could you please let me know if you have any ideas?

Thanks,

Brian

Replace you \r\n with </br>

You’ll also want to change your script to use results.html(result) so those </br> tags are respected.

Aha! Very nice, thank you very much. :slight_smile: