Save TextArea Variable with line breakes - Forum

Forum Navigation
You need to log in to create posts and topics.

Save TextArea Variable with line breakes

I have a TextArea object and user insert some text into it.

when i want to save TextArea variable and load it later, line breakes will not saved.

how to save it with line breakes?
or
how to add a text with line breake into TextArea Object?

Thanks!

 

 

Every HTML object will accept <br> tag as a linefeed except for TextArea.
A line feed in TextArea objects works more like in a traditional text file using \r\n as a new line special characters.
All you have to do is take it into account when showing text from a TextArea into any other object or setting the text inside a TextArea.

Example to use in a TextArea variable (will show two lines):

SetVar [myvar] "Hello\r\nworld!"

Example to take a variable from a TextArea and show it into a Container object:

StrReplace "[myvar]" "\r\n" "<br>" [myvar] ""
SetObjectHTML "Container1" "[myvar]"

Take a look at the attached sample.

 

Uploaded files:
  • You need to login to have access to uploads.
noyzen has reacted to this post.
noyzen