Line breaks in text variable
Feb 19, 2013
When I create a new text variable, I would like to assign an initial value containing line breaks. How do I do that?
A variable connected with a textentry field can contain line breaks, so I know it must be possible. With a little javascript I can see, that the line breaks is ASCII character 13 (carriage return), but how do I enter that value in the entry for a variables initial value? I have - without any luck - tried enter, shift + enter and \n.
Jørgen
9 Replies
Jørgen,
I had a similar requirement just a few weeks ago. Articulate support confirmed this is a known issue at this time...you cannot insert line breaks in a variable's value input box.
Steve,
OK, nice to know!
I found a workaround: Copy/paste or enter your text with line breaks into a textentry field (design time). Then copy/paste the text from the textentry field to the variable's input box. The text will appear without line breaks in the input box, but when you show it in a text field (run time), the line breaks show up. Voila!
Thanks
Jørgen
Hi,
Just to say thank you! That was exactly what I was looking for.
The Export/Import Translation also do the job (especially if you have a lot of variables as in the course we are working on).
Unfortunately, we cannot change the font of some words (color, size, bold,...). Maybe someone has another trick ?
Hi Quentin,
What words are you unable to change the formatting for? Are they for just variables or just particular words you're struggling with? Possibly you could share an example of the element you're struggling with and we could take a look at that.
Hi Ashley,
Maybe it is asking too much, but it would be cool if we can change the font of the text of a text variable.
In the attached sample, when hovering on the image, the appropriate message is displayed according to the slide. It is done with the text variable "Msg".
We tried to export them in Word, change color, bold,... and then import the "translation" but it does not work.
Hi Quentin,
I may be misunderstanding (happens often towards the end of a Monday). But you're looking to update each individual variable change from within the translation document so that they'll all appear differently on the slides themselves? I don't think you can do that - as it's control by the variable reference placeholder on your master slide, not what the text is being changed to.
You're welcome to share your thoughts in the form of a feature request, but I expect it to always default to the formatting of the variable reference itself.
You can use the notes section to do your line formatting and then past it into the variable.
Hello !
I know this topic is very old but I'm jumping in since I had the same issue and a quick google search lead me here 😁
The solutions above didn't really work for me but I found an easy and quick fix and it works really great! It's about HTML code.
Hope it helps!
Lucie
Hello Lucie!
Thanks so much for sharing your workaround with the E-Learning Heroes Community! We appreciate you! 🎉
Have a great day and happy developing!