Hi all,
¿Can you help me with this?
I'm trying to get the selected text from a text area using javascript.
It does not work because "selectionStart" and "selectionEnd" seem to be undefined.
This is my code:
const instance = runtime.objects.textAreaObject.getFirstInstance();
var startSel= instance.selectionStart;
var endSel= instance.selectionEnd;
var result = instance.text;
result = result.substr(startSel, endSel - startSel);
alert(result);
Any idea of what is happening?
Do you know any other way to achieve it?
Thank you