I'm trying to get data (taken from mongo) to display into a textarea. It's purpose is so that I can edit data within the database without actually touching the database itself. I can display the data within normal HTML tags but I'm pretty clueless on how to get it to display it within a textarea (or any other tags that allow me to edit and re-submit the new data)
I'm rendering with EJS, and so far, everything display correctly with
<%= text %>
I just need it to work within a editable text area
I'm trying to get data (taken from mongo) to display into a textarea. It's purpose is so that I can edit data within the database without actually touching the database itself. I can display the data within normal HTML tags but I'm pretty clueless on how to get it to display it within a textarea (or any other tags that allow me to edit and re-submit the new data)
I'm rendering with EJS, and so far, everything display correctly with
<%= text %>
I just need it to work within a editable text area
Share Improve this question edited Oct 28, 2017 at 22:14 Neil Lunn 151k36 gold badges356 silver badges325 bronze badges asked Oct 28, 2017 at 22:11 Justin LiJustin Li 914 silver badges11 bronze badges 1- Please show what you have so far – Code-Apprentice Commented Oct 28, 2017 at 22:26
1 Answer
Reset to default 6This should work:
<textarea id="yourTextArea"><%= text %></textarea>
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745604838a4635614.html
评论列表(0条)