Line break in repeater text box

you can’t directly.

BUT

There are 2 different ways of solving this, getting the line break into the DB or displaying them afterwards.
I think the first option is the most straightforward since you don’t need to code at all.


Getting the line-breaks into the DB

You can’t add them directly in the DB editor (afaict). But you can import them.
The most simple way to do this is to export the current data (it’s enough to have one single entry) see CMS (Formerly Content Manager): Exporting Content from Your Collection | Help Center | Wix.com

Open it with some spreadsheet application (or some writing app, but you must know what you are saving if you do that!). Add the line-breaks (some applications require to press shift-enter or ctrl-enterl to add the line break). In my case I used Libreoffice Calc and have to press F2 on a cell to paste the content with line breaks.

You can then import the DB and you should see your line breaks.


Coding time

This is a little more complicate and involves adding the line breaks in the DB as “\n” (which will get “recoded” into \n, escaping the original meaning of line break, you can use whatever you want actually, it will signal the place where a line break is to be expected).

Then it really depends where exactly you are writing the data, but the trick is replacing those string by line breaks.
For example, I have a repeater linked to the dataset which has some other functionality, so I manipulate the entries directly in this functions:

$w.onReady( function () {
$w(‘#repeater1’).onItemReady(($item, itemData, index) => {
itemData.txtWLinebreaks = itemData.txtWLinebreaks.replace(/\n/g, ‘\n’)

You need to replace:
#repeater1’ is just the id of the repeater section.
txtWLinebreaks is the name of the database column containing the values with the line breaks.

This might be tricky so stick with the previous solution.