Same thing as Javascript Window.GetSelection. Basically I want to be able to grab the selected text in an html input with Blazor.
<input type="text" value="" />
So whatever value is written into the input, upon mouse-selection will be stored in a string
string mySelectedText { get; set; }
and the variable will hold this:
mySelectedText = "selection is made";
Dom-manipulation should be done with @on
as shown in this list but i cannot see any @onSelection
in that list
I have tried this suggestion without any success. The user-event must be mouse-selection of text from input, and the selected text must be stored or showed.