great, but i want to simule a list in textarea, like:

<textarea id="mytext">
-1
-2
-3
</textarea
understood? I don´t need create a list, but want to simulate someone
in textarea  =D
I try some adds codes, but not works =/

My problem is how i break a line in textarea (i try a lot things and dont work)


On 5/21/07, Jake McGraw <[EMAIL PROTECTED]> wrote:
Ahh, I see what you're getting at:

HTML:
<input type="text" name="mytext" id="mytext"/>
<ul id="mylist">
</ul>

JavaScript:
$("#mytext").keypress(function(event){
  if (!event.keyCode||event.keyCode!=13) return;
  $("#mylist").append("<li>"+$(this).val()+"</li>");
  $(this).val("");
});

Works in Firefox.

 - jake


On 5/21/07, Jean Nascimento <[EMAIL PROTECTED]> wrote:
>
> Tkz for the tips but using jQuery it will show ???
>
> On 5/21/07, Jake McGraw <[EMAIL PROTECTED]> wrote:
> > Jean:
> >
> > Have you looked at some of the WYSIWYG (What You See Is What You Get)
> > JavaScript text editors? TinyMCE is a popular choice to do what you
asked
> > and much more.
> >
> > - jake
> >
> >
> >  On 5/20/07, Jean Nascimento < [EMAIL PROTECTED]> wrote:
> > >
> > > How i make a list in a textarea? My ideia is do a script to when the
> > > user press ENTER in ah description textarea, this event create another
> > > row list. For my textarea look like some to do list.
> > >
> > > Thanks for the ideas ;D
> > >
> > > --
> > >
> > > []´s Jean
> > > www.suissa.info
> > >
> > >    Ethereal Agency
> > > www.etherealagency.com
> > >
> >
> >
>
>
> --
>
> []´s Jean
> www.suissa.info
>
>    Ethereal Agency
> www.etherealagency.com
>




--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com

Reply via email to