save line breaks in textarea code example
Example 1: keep line breaks in textarea
// preserve line breaks ( \n -> <br> )
$_translated_text = nl2br($_original_text);
Example 2: mat-form-field textarea save with new line
white-space: pre-wrap
// preserve line breaks ( \n -> <br> )
$_translated_text = nl2br($_original_text);
white-space: pre-wrap