how can I create a button that when clicked, it simulates ENTER as if it were physically pressed on the keyboard.
In other words, this button when clicked simulates the ENTER button inside the text area, where text is being written.
For instance, after the button is clicked,
Original text area text:
XXX XXX XXX
Becomes
New text area text:
XXX XXX XXX
New line
All of this is simulated via a button click.
Let's assume the text area has an ID of #QR
Strictly javascript, no jquery