title: Get selected text in a Dash application
body: <p>I would like to receive text selected by the user when the user presses a button.</p>
  <p>The background is:</p>
  <p>I’d like to create an app to label text sequences (for an NLP application). The user would:</p>
  <ul>
  <li>Look at the presented text</li>
  <li>Select a piece of text</li>
  <li>Press a button to confirm selection</li>
  <li>Repeat</li>
  </ul>
  <p>So, once the user presses a button, I would like to receive the currently selected text as input.</p>
  <p>Is that possible with Dash? In Dash, you can attach callbacks to component properties. So, I was looking for a property that captures the text selection. Unfortunately, <code>html.Div</code>, <code>html.P</code>, or <code>html.Span</code> don't have it. <code>dcc.Input</code> has it but it is only limited to one line and I need to show a multi-line text. And <code>dcc.Textarea</code> while not being limited to one line, again, doesn't have such a property.</p>