0

How can implement a list within a Textarea. Where User click in text area it should generate 1st listitem no and also same when pressing Enter key.

2
  • You didn't even specify a language
    – Idos
    Commented Jan 24, 2016 at 11:27
  • html, Javascript, Jquery, PHP Commented Jan 24, 2016 at 11:30

3 Answers 3

1

One thing you can do is, let the user write all the data in the text file, where each data goes in the next line.Use php in the action page to get the data and then explode it using explode() to get individual list element in an array.

0

You cannot put it inside a textarea what you can do is make a DIV editable and use HTML inside and style it to look like a textarea,

This piece of code is exactly what you want and when user press enter it will generate.

<div class="editable" contenteditable="true">
<ul>
    <li>List item</li>
    <li>List item</li>
</ul></div>
0

I think you can't apply any html tag inside textarea.

Probably you should use and editor for this.

http://www.1stwebdesigner.com/10-best-wysiwyg-text-and-html-editors-for-your-next-project/

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.