D
Disc Magnet
For text elements there is a select() method to select text. I am
trying to provide the user with this feature. If he clicks within a
<textarea> element, all text is selected. This is easy to do using the
select() method. But if he clicks again, all text should be
unselected.
For this to happen, I need to know whether any text is already
selected in <textarea>. How can this be achieved?
trying to provide the user with this feature. If he clicks within a
<textarea> element, all text is selected. This is easy to do using the
select() method. But if he clicks again, all text should be
unselected.
For this to happen, I need to know whether any text is already
selected in <textarea>. How can this be achieved?