How to select text in TextArea

How to select part of text in TextArea? For example, I have the start and end position of the text, and I need to change the background color to yellow. How to do it using jQuery or simple JavaScript?

+3
source share
1 answer

Unfortunately, the item textareais just plain text. You will need to use a WYSIWYG editor such as FCKeditor or TinyMCE (or collapse your own widget based on divwith designmodeor contenteditableif you need highlighting). It can help you. Good luck

+7
source

Source: https://habr.com/ru/post/1712987/


All Articles