Dmitry
Dmitry

Reputation:

How to highlight text in TextArea

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?

Upvotes: 3

Views: 1370

Answers (1)

AKX
AKX

Reputation: 169388

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!

Upvotes: 7

Related Questions