Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 142591

How do I access the user selected text within an element ui input?

$
0
0

I want to access the text within an ElInput component via Javascript in Electron. According to mozilla it is impossible to access information within an html input or textfield via window.getSelection.

I unsuccessfully tried to access the selection with the proposed selectionStart

const input = document.getElementById("input")
alert(input.selectionStart.toString)

Given that this doesn't work, what do I have to do, to get the text in my selection within my el-input?


Viewing all articles
Browse latest Browse all 142591

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>