Darren Stanford
Posts: 0
Joined: Sun Dec 15, 2013 6:23 am

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.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

How do i insert a linebreak in the text area?

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

Tom6106181
Posts: 0
Joined: Fri Aug 02, 2013 12:39 pm

How do i insert a linebreak in the text area?

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?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

How do i insert a linebreak in the text area?

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?

Tom6106181
Posts: 0
Joined: Fri Aug 02, 2013 12:39 pm

How do i insert a linebreak in the text area?

I figured it out myself after some trial and error.

Return to “Issues”