1// To set the textarea value, you must insert the TEXT into the element.
2<textarea>VALUE</textarea>
3// javascript
4var textarea = `<textarea>${value}</textarea>`;
5document.getElementById('my_textarea_id').textContent = 'foo'
6// php
7$value = 'foo';
8$textarea = "<textarea>$value</textarea>";
9echo $textarea;