I'm trying to build a texteditor and for that I'm using a textarea to fill in my text
My problem is when I click a button the textarea selection is gone.
Here is some code to show the problem:
<!DOCTYPE html>
<html>
<body>
Address:<br>
<textarea id="myTextarea">
California Road
</textarea>
<p>Click the button to select the contents of the text area.</p>
<button type="button">Try it</button>
</body>
</html>