3

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?

1 Answers1

7

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
  • 152,115
  • 15
  • 115
  • 172