[Database & Repeater] How to make multiline text into single line ?

I have a repeater that can display the data of a dataset and everything works fine. However, there is a field containing customer-generated text and some of the text are input in multiline (I mean “Enter”). So, the textbox in the repeater shows the text in multiline just like what it originally looks like.

My question is how to transform the multiline into a single line (without “Enter”) by using Velo codes? (of course not affecting the data in the dataset)

Marco, something like this using the javascript replace function on a field named “description” where the n flag is for new lines and the g flag signifies all occurrences, not just the first one. If this element is connected to a dataset field, you will want to disconnect it and let this code do the assigning.

export function repeater1_itemReady($item, itemData, index) {
    let replaceText = itemData.description.replace(/\n/g, " ");
    $item("#textbox1").value = replaceText;
}