If I add a <br> in a text element, the <br> is just displayed without creating a new line. How can I instruct the text in the text element to move to the next line?
Lucas G
1 year ago
You should be able to just press Enter when entering the text in the box
Patrick Mast
1 year ago
And how can I do it from a formula?
Lucas G
1 year ago
I'm not sure on your setup or how the data is coming in
But a 'simple' one could be to use 2 text nodes
I don't know if I would go that route but I haven't ran across this issue 🤔
Line breaks happen as normal for me
Patrick Mast
1 year ago
I have dynamic data that needs to be displayed in one <text> element. How do I add a <br> or <goToNextLine> to it? In HTML its <br>, in other languages its sometimes /n. Look at this sample: This works great: https://files.taxi/patrick/zucCihyd.png But, how can we do this in a formula: https://files.taxi/patrick/9ZskQTCB.png
Andreas Møller
1 year ago
Yeah this is unfortunately not possible atm. A work around I use is to create a variable called line break. You can add a line break as the default value.
Andreas Møller
1 year ago
🤦♂️
Patrick Mast
1 year ago
Hey @Andreas Møller, thanks! I'm not 100% understanding your sugested solution. I tries like this but dod not work:
You could use the replace node to replace all <br> with the content of your variable. This should work
Patrick Mast
1 year ago
Hey @Max, please try this sample app: https://start-text_on_next_line.toddle.site/ For testing purpose, it has a variable "Test_Text" that holds the text to display. I tried with "Replace all", but as you can see, the lines are not printed below each other:
@Patrick Mast
Max
1 year ago
I meant like this 🙂
Lucas G
1 year ago
If it's that much text you could probably also just use an HTML block
Patrick Mast
1 year ago
Hey @Lucas G, yes, I tried. But the downside of the HRML block is that it's hard to configure. It only has one global setting for its colors for example.
Lucas G
1 year ago
Ah I see
I have my own but if it's a package then yeah I could see it being tough to have a lot of customization
Patrick Mast
1 year ago
Hey @Max, can you show me whats inside the LINE_BREAK var? I tried the same with a "space" as the contents of the variable LINE_BREAK, but does not work here 🙂 Normally, this should be oh so much easier 😉
Lucas G
1 year ago
His line break variable is just "Enter"
Max
1 year ago
This is just "Enter"
Ah, @Lucas G was faster again 😉
Lucas G
1 year ago
lol
Also, perhaps try cloning the package so you can give it your own configs
Max
1 year ago
Patrick Mast
1 year ago
Haha, WORKS!!! Thanks! But again.. This should be made simpler for our other Toddle users! 😉