How do i insert a linebreak in the text area?
How do i insert a linebreak in the text area? rather than having to open a separate textarea to space out paragraphs? I have tried a few things but cannot figure it out, cheers.
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
How do i insert a linebreak in the text area? rather than having to open a separate textarea to space out paragraphs? I have tried a few things but cannot figure it out, cheers.
Hello Darren!
Note, that Text area data can be edited on Preview (and by use of Enter you can insert line breaks) http://docs.appery.io/documentation/u...
If you want just to show some info it's better to use Label component http://docs.appery.io/documentation/u....
I am having some line-break trouble with saving text-area content to DB.
addScreen, text-area: Description
viewScreen, display description
I have tried a couple approaches.
If do not do anything with the Description.Value (addScreen), and just save it to DB, the line-breaks are gone on viewScreen when displaying the "description text".
Output: some text...somemore text Even more text.blablabla
Second approach, I manipulate the Description.value before saving it to DB like this:
code
return value.replace(/\r?\n/g, '<br />');
/code
And then display.description (viewScreen) is working fine.
Now my problem is when I need to EDIT the DB.ITEM,
Textarea looks like this:
sometext....somemore text
Even more text.blablabla
Is there anyway to save to DB, and keep line-breaks intact from a textarea?
Hello!
Sorry, not sure I understand. If you want to edit in app, it works for us. What libraries version you use? If you want to edit in back-end console, there is no way to do that.
Could you describe the problem in more details?
I figured it out myself after some trial and error.