Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

textarea field is no longer retaining linebreaks when importing into created page

Kevin Kott March 24, 2025

Hello,

We are using the textarea field to create lists with a specific format. I will list the format below.

Item1,
Item2,
Item3,
Item4

This list is entered within a field of type textarea. We are importing this list into a newly created page using the .renderAsHtml virtual function. What is happening is this list is being imported without the linebreaks which is not good for display purposes. I will show how it is being imported below.

Item1, Item2, Item3, Item4 and so on. These items can be very long in text and the list can contain many items. It is just easier to have the list display vertically instead of one after another. This issue when importing the list did not used to happen, but I am unsure if this is happening because we switched from a text to a textarea field. This change happened a while ago and we have just noticed this issue

2 answers

1 accepted

0 votes
Answer accepted
Kevin Kott March 24, 2025

Just discovered the .replaceCRLFWithBR virtual function. Will test that out here after our confluence outage is resolved

Kevin Kott March 24, 2025

So the replaceCLRFWithBR virtual function doesn't work if you try calling it within a template. I was able to accomplish what I was trying to do by first creating a field of type text that is set with [entry.textareaField.replaceCRLFWithBR]. Then within my template, [entry.textListField.renderAsHtml] is used to get the list in the format that we are trying to use

Kevin Kott March 25, 2025

[Deleted]

0 votes
Kevin Kott March 25, 2025

[Deleted]

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events