Adding bullet points to a text area?

前端 未结 7 1088
青春惊慌失措
青春惊慌失措 2021-02-10 16:27

Is there a way to add bullet points to an HTML textarea?

I want to add a simple feature where a bullet point is added for every line in a text area (similar to a list bu

相关标签:
7条回答
  • 2021-02-10 17:26

    You can't do that but there is another way. delete the textarea.

    '<section id="textarea" contenteditable="true">
    <ul>
        <li>List item here</li>
        <li>List item here</li>
        <li>List item here</li>
        <li>List item here</li>
    </ul>
    
    </section>'
    
    0 讨论(0)
提交回复
热议问题