On Dec 20, 2009, at 5:21 PM, Šime Vidas wrote:


Say, we have an input box or a textarea. There are two words selected.
I need to make them italic (<i></i>) if a button is clicked.

You want to put <i> elements inside <input type="text /> or
<textarea> ?
That's not possible... <input> is an empty element, and <textarea>
only accepts character data..


I think he just wants to put those characters in the actual textarea or input.

Andre, for this sort of thing, I highly recommend the jQuery MarkItUp plugin:
http://markitup.jaysalvat.com/


--Karl

____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com

Reply via email to