is there any way to include line breaks in a text variable?
I have a textbox displaying the current text variable, and I want to be able to change the text variable so the text in the textbox gets updated,almost every new text contain line breaks.
You describing 2 different things. The text in the text box will be updated if the variable is working.
Forcing a line break in a text box is another thing.
The method I use to ensure text is wrapped (or a line break occurs) is to right-click the text box, select Format shape, select Text Box in the left menu, then select the radio button that forces the text to fit the text box.
I'm building a e-learning course that contains around 50 slides and on every slide there will be a textbox at the bottom with different text on every slide describing the content of the slide (with line breaks). Instead of having 50 different text boxes, I would like to have only one textbox in a masterpage layout that shows a text variable that I can change on the different slides. This way it would be very easy to change text color, textbox size etc for all slides easily.
The master slide will take care of you for styling, but line breaks won't happen. I know of no elearning IDE that will automatically allow for line breaks.
I have not attempted this myself, however, you may want to look into a JavaScript solution such as: string.match(/.{1,10}/g).join(" ");
9 Replies
Do you mean you want to add text to a variable and keep the current text? If so you need to use javascript
There are plenty of examples of code + Storyline files on here just search for Concatenate
Hi David:
You describing 2 different things. The text in the text box will be updated if the variable is working.
Forcing a line break in a text box is another thing.
The method I use to ensure text is wrapped (or a line break occurs) is to right-click the text box, select Format shape, select Text Box in the left menu, then select the radio button that forces the text to fit the text box.
Hope this helps.
Best Regards,
Dennis Hall
Hi, thank you for quick responses.
I actually just want to be able to include line breaks in a text variable for later usage.
For example, I want to set a variable textboxText to:
"Hi,
What is your name?
Cheers!"
And then on another slide print the variable in a textbox. Right now I can't get the line break to show in the new textbox.
Hi David:
Understand. Unfortunately, you will not be able to split a variable across lines.
Looking at your example, I could see 3 variables, yet do not understand exactly why the first and third would not be constants.
Are you trying to accomplish something related to translations?
Can you elaborate on what you are trying to accomplish?
Best Regards,
Dennis Hall
Hi,
ok.
I'm building a e-learning course that contains around 50 slides and on every slide there will be a textbox at the bottom with different text on every slide describing the content of the slide (with line breaks). Instead of having 50 different text boxes, I would like to have only one textbox in a masterpage layout that shows a text variable that I can change on the different slides. This way it would be very easy to change text color, textbox size etc for all slides easily.
David,
Jergen offers a solution at the end of this thread:
http://community.articulate.com/forums/t/25674.aspx
However, I just tried and it and this doesn't seem to work for me. Perhaps it worked prior to one of the updates to Storyline.
Steve,
it actually worked, thank you very much, that saved me a lot of time
/David
Hi David:
Thanks for clarifying.
The master slide will take care of you for styling, but line breaks won't happen. I know of no elearning IDE that will automatically allow for line breaks.
I have not attempted this myself, however, you may want to look into a JavaScript solution such as: string.match(/.{1,10}/g).join("
");
Best Regards,
Dennis Hall
Hi David! Glad you got the assistance you needed here. Thanks everyone for helping out
This discussion is closed. You can start a new discussion or contact Articulate Support.