Reputation: 6466
I display a multi-line textarea
in a displayfield
but the text is shown as concatenated instead of line by line.
Here is the sample fiddle: https://fiddle.sencha.com/#fiddle/10f6
How can I make the text to be displayed in displayfield
in exactly same way with textarea
?
Upvotes: 2
Views: 3764
Reputation: 74096
You can use a renderer
, like:
renderer: function(value){
return value.replace(/\n/g, '<br>');
}
For example: https://fiddle.sencha.com/#fiddle/10f8
Upvotes: 3