Click here to Skip to main content
14,452,439 members
Rate this:
Please Sign up or sign in to vote.
See more:
I need to highlight specific text inside textarea. I searched a lot online but most of them have stated that its impossible to highlight specific text inside textarea. Instead we should use content editable div as such. But I need to highlight text inside textarea. Is there any way to do that? Some have stated that if textarea is wrapped with pre tag ,then its possible. But am blank how to use pre tag with textarea.
Posted

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Hi,

there are a few jQuery plugins that provide this functionality.

Something like this should help:
jQuery highlightTextarea[^]

Hope it helps.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100