add backslash with select all text in textarea in js code example
Example: select all text in textarea javascript
<textarea onclick="this.focus();this.select()"></textarea>
<!-- To copy the text -->
<textarea onclick="this.focus();this.select();document.execCommand('copy')"></textarea>