[jQuery] Re: The best practice to do this
you would have to allow the return to be inserted as well! I'm having trouble understanding what you mean. You don't want any real s, just a textarea, but you want a - added with every newline? On 5/22/07, Jean Nascimento <[EMAIL PROTECTED]> wrote: n that dont break the line =p On 5/22/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote: > $("#mytext").keyup would be called for every character entered... > if they hit a return (or enter or tab) you could insert an · > > Is that what you want?? > > > > On 5/22/07, Jean Nascimento <[EMAIL PROTECTED]> wrote: > > > > great, but i want to simule a list in textarea, like: > > > > > > -1 > > -2 > > -3 > > > 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: > > > > > > > > > > > > > > > JavaScript: > > > $("#mytext").keypress(function(event){ > > > if (!event.keyCode||event.keyCode!=13) return; > > > $("#mylist").append(""+$(this).val()+""); > > > $(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 > > > > > > -- > Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- []´s Jean www.suissa.info Ethereal Agency www.etherealagency.com -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: The best practice to do this
Have you tried using a newline, like \n? On 5/22/07, Jean Nascimento <[EMAIL PROTECTED]> wrote: n that dont break the line =p On 5/22/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote: > $("#mytext").keyup would be called for every character entered... > if they hit a return (or enter or tab) you could insert an · > > Is that what you want?? > > > > On 5/22/07, Jean Nascimento <[EMAIL PROTECTED]> wrote: > > > > great, but i want to simule a list in textarea, like: > > > > > > -1 > > -2 > > -3 > > > 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: > > > > > > > > > > > > > > > JavaScript: > > > $("#mytext").keypress(function(event){ > > > if (!event.keyCode||event.keyCode!=13) return; > > > $("#mylist").append(""+$(this).val()+""); > > > $(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 > > > > > > -- > Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- []´s Jean www.suissa.info Ethereal Agency www.etherealagency.com
[jQuery] Re: The best practice to do this
Hi, > > -1 > -2 > -3 > My problem is how i break a line in textarea (i try a lot things and dont > work) ?? It yould simply work by inserting a '\n' at the appropriate place in the Textarea. Christof
[jQuery] Re: The best practice to do this
n that dont break the line =p On 5/22/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote: $("#mytext").keyup would be called for every character entered... if they hit a return (or enter or tab) you could insert an · Is that what you want?? On 5/22/07, Jean Nascimento <[EMAIL PROTECTED]> wrote: > > great, but i want to simule a list in textarea, like: > > > -1 > -2 > -3 > 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: > > > > > > > > > > JavaScript: > > $("#mytext").keypress(function(event){ > > if (!event.keyCode||event.keyCode!=13) return; > > $("#mylist").append(""+$(this).val()+""); > > $(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 > -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ -- []´s Jean www.suissa.info Ethereal Agency www.etherealagency.com
[jQuery] Re: The best practice to do this
$("#mytext").keyup would be called for every character entered... if they hit a return (or enter or tab) you could insert an · Is that what you want?? On 5/22/07, Jean Nascimento <[EMAIL PROTECTED]> wrote: great, but i want to simule a list in textarea, like: -1 -2 -3 wrote: > Ahh, I see what you're getting at: > > HTML: > > > > > JavaScript: > $("#mytext").keypress(function(event){ > if (!event.keyCode||event.keyCode!=13) return; > $("#mylist").append(""+$(this).val()+""); > $(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 -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Re: The best practice to do this
great, but i want to simule a list in textarea, like: -1 -2 -3 wrote: Ahh, I see what you're getting at: HTML: JavaScript: $("#mytext").keypress(function(event){ if (!event.keyCode||event.keyCode!=13) return; $("#mylist").append(""+$(this).val()+""); $(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
[jQuery] Re: The best practice to do this
Ahh, I see what you're getting at: HTML: JavaScript: $("#mytext").keypress(function(event){ if (!event.keyCode||event.keyCode!=13) return; $("#mylist").append(""+$(this).val()+""); $(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
[jQuery] Re: The best practice to do this
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
[jQuery] Re: The best practice to do this
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