javascript - Make <li> tags editable - Stack Overflow

I need something like html <ul> list.It should contains bullets and something like textarea. text

I need something like html <ul> list.

It should contains bullets and something like textarea.

textarea{
  border : none;
}
.custom-txt-area{border-bottom : 1px dashed red;}
<ul>
  <li>
    <textarea class="custom-txt-area" rows="1"></textarea>
  </li>
  <li>
    <textarea class="custom-txt-area" rows="1"></textarea>
  </li>
</ul>

I need something like html <ul> list.

It should contains bullets and something like textarea.

textarea{
  border : none;
}
.custom-txt-area{border-bottom : 1px dashed red;}
<ul>
  <li>
    <textarea class="custom-txt-area" rows="1"></textarea>
  </li>
  <li>
    <textarea class="custom-txt-area" rows="1"></textarea>
  </li>
</ul>

This is very sample example. Problem here - I can't make textarea extend it height to the bottom if it contans more than 1 row.

Share Improve this question asked May 30, 2016 at 11:08 demodemo 6,24519 gold badges83 silver badges158 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 9

Maybe you are looking for contentEditable:

jsFiddle

<ul>
      <li contenteditable="true">Edit ME!</li>
      <li contenteditable="true">Edit ME!</li>
      <li contenteditable="true">Edit ME!</li>
      <li contenteditable="true">Edit ME!</li>
      <li contenteditable="true">Edit ME!</li>
      <li contenteditable="true">Edit ME!</li>
    </ul>

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

相关推荐

  • javascript - Make &lt;li&gt; tags editable - Stack Overflow

    I need something like html <ul> list.It should contains bullets and something like textarea. text

    8天前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

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

关注微信