Hi guys !
I stumbled upon this problem and did not find the solution in the last few days… so you are my last hope.
Here is the problem to solve.
I have a multiline input. The user can click on this multiline input. I want to get the multiline input’s text value that is written before the cursor position of the user.
Let’s see an example, to be clear. If the total text input is the following, with (cursor) the position of the user’s cursor in the multiline input :
“Hello (cursor) world !”
I want the returned value to be: “Hello”
I know I can get the selected text to be returned. I know I can get the cursor position in the text.
But I can’t get the value of the text before the cursor position !
If anyone has some idea on how to do this, it would be greatly appreciated !