Is it possible to get the word under the mouse cursor in <textarea>?
I have asked this question many times regarding text in tags <p>or similar html output tags such as here , but <span>for the obvious reasons , the solution doesnβt work with <textarea>.
One approach that I examined is to fire a jQuery event click()to position the cursor, and then use something like Tim Down answere here to get the current word at the cursor location. But the event click()does not place the cursor at all.
Thus, an answer will be sufficient. How do I simulate a click event inside <textarea>to place the cursor at the current mouse position?
source
share