Perspective Line Breaks in text label/markdown

How to do line breaks in a text label in Perspective?

I try to replace “\n” by “< b>”(without space) in a script transform but it didn’t work, the is showing and doesn’t create a line break. I try Markdown component too but I have the same issue, I can’t have line break.

You will need to use a markdown component, the proper element however is </br>

Also, ensure you have set the escapeHtml property false.

I have set the escapeHtml property false and add </br> at the end of the line but do I need to do it in a script transform?

If the text is changing then you would need to do this in a transform. If it is static then there wouldn’t be a need to do it in a script.

Ok thanks I understand that part!
But right now my Markdown as a Component Error, do you understand why?

You need to also indicate where the html starts.

Put in opening and closing html tags:

<html>Your Text</br>should go here</html>

Note that you can not have any new lines in your text or this will also result in a component error.

</br> may work, but I’ve always used <br> (no forward slash). This might be part of the problem.

The official short tag is <br/>.

1 Like

you can also do this in labels/buttons ect.

look here and the quote i did there.