Formatting in TextArea


#1

Is it possible to have some formatting (like line-breaks) in the TextArea without converting it to HtmlArea?

We have a mixin for the lead paragraph, but I haven’t found a way to insert line-breaks without converting it to HtmlArea.



#2

TextArea input type supports the same formatting as <textarea> HTML input. It does support linebreaks, but via \n, not <br>.

For example, line1\nline2 will give you

line1
line2

#3

Ok, so I have to put something i config, right? What should it be, then?


#4

Your question was if TextArea supports formatting, like line breaks. The answer is - yes, it does support formatting, but very basic one. Line breaks are supported via \n combination:

If your question was if you can simply convert HTML into text that is supported by TextArea, then the answer is no. You will have to implement conversion yourself.