views:

195

answers:

1

How can I highlight some portion of the text in TextArea? For example I have start and end position of the text and I need change its background color to yellow. How can I do this using jQuery or simple JavaScript?

+4  A: 

Unfortunately the textarea element is plain text only. You'll need to use a WYSIWYG editor like FCKeditor or TinyMCE (or roll your own widget based on a div with designmode or contenteditable if you only need highlighting). This might help you along. Good luck!

AKX