Page 1 of 1

How do i insert a linebreak in the text area?

Posted: Sun Dec 15, 2013 6:23 am
by Darren Stanford

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.


How do i insert a linebreak in the text area?

Posted: Sun Dec 15, 2013 7:10 am
by Alena Prykhodko

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....


How do i insert a linebreak in the text area?

Posted: Fri Mar 14, 2014 11:32 am
by Tom6106181

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&#46;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?


How do i insert a linebreak in the text area?

Posted: Fri Mar 14, 2014 1:03 pm
by Maryna Brodina

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?


How do i insert a linebreak in the text area?

Posted: Fri Mar 14, 2014 1:31 pm
by Tom6106181

I figured it out myself after some trial and error.