title: Select characters (highlight text) in input on mousedown and mouseup with Blazor Component
body: <p>Same thing as Javascript Window.GetSelection. Basically I want to be able to grab the selected text in an html input with Blazor.</p>
  <pre><code>&lt;input type=&quot;text&quot; value=&quot;&quot; /&gt;
  </code></pre>
  <p>So whatever value is written into the input, upon mouse-selection will be stored in a string</p>
  <pre><code>string mySelectedText { get; set; }
  </code></pre>
  <p>So the user will do this:
  <a href="https://i.stack.imgur.com/IvfZm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IvfZm.png" alt="user select text from input" /></a></p>
  <p>and the variable will hold this:</p>
  <pre><code>mySelectedText = &quot;selection is made&quot;;
  </code></pre>
  <p>Dom-manipulation should be done with <code>@on</code> as shown in <a href="https://blazor-university.com/components/component-events/browser-dom-events/" rel="nofollow noreferrer">this list</a> but i cannot see any <code>@onSelection</code> in that list</p>
  <p>I have tried <a href="https://stackoverflow.com/questions/60110779/get-the-selected-text-from-an-input-using-blazor">this suggestion</a> without any success.
  The user-event must be mouse-selection of text from input, and the selected text must be stored or showed.</p>