'Configure line break in HTML textarea

If I enter the following text in a TextArea

1
2

and read the value by using document.getElementById, I get 1\n2

Is there a way to configure TextArea to return \r\n as line break instead \n



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source