I have a perspective button that the text is bound to an indirect memory tag, and I need to insert one or more line feeds. I tried

but that did not work, showing the entire line with the html on the button. I did set the White space to pre-wrap, but that did not work either.
Interestingly enough, it does show the line feed in the value in the tag tree.


hmmm… my Buttons automatically wrap but there are times I want to force nl.
If anyone has a solution, I’m interested in seeing it but, until then…
You might try a Markdown component instead.
The downside is you have to use ‘Mouse Events’ instead of ‘onActionPerformed’
They normally do wrap, but not when I tried to force the line feed. I need to make sure the function is on a separate line, so I need to force the line feed.
I tried the Markdown without success there either.

Try just using this in the button text:
'Cart Supply \n\nCart Supply\n\nJog'
with your whitespace set to one of the pre-*
I know when you are using \n with pre, you need to bind the label to an expression = ‘Cart Supply \n\nCart Supply\n\nJog’ even though it is a static string. For some reason, the pre break has only worked for me in an expression. I am not sure how to apply this same concept when reading from a tag though.
set to -pre removed all the work wrap and just did a single line
Markdown is not HTML markup.
These may be helpful for the Markdown component:
Perspective - Markdown | Ignition User Manual
Basic Syntax | Markdown Guide
It will look like this when you edit long/multiline text:
I haven’t got to the scripting yet, but it looks promising that I can do the needed formatting. Thank you.