¿Can you help me with this?
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);
Any idea of what is happening?
Do you know any other way to achieve it?