javascript - Displaying data inside textarea (ejs) - Stack Overflow

I'm trying to get data (taken from mongo) to display into a textarea.It's purpose is so that

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
Add a ment  | 

1 Answer 1

Reset to default 6

This should work:

<textarea id="yourTextArea"><%= text %></textarea>

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745604838a4635614.html

相关推荐

  • javascript - Displaying data inside textarea (ejs) - Stack Overflow

    I'm trying to get data (taken from mongo) to display into a textarea.It's purpose is so that

    16小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信