how to detect url inside a textarea

chrome can detect url inside a textarea
select an url – right click – and you’ll see – go to ...
so I hope it is possible similar by clicking inside an url – get the href in console
the code below is probably a start but it results in entire body as selection
any idea?

document.onselectionchange = () => {
    var selection = window.getSelection();
<script src=""></script>
<textarea id='ed'>
lorem ipsum
dolor sit

177 thoughts on “how to detect url inside a textarea”

  1. Pingback: womens viagra
  2. Pingback: cheapest viagra
  3. Pingback: cheap viagra
  4. Pingback: viagra pills
  5. Pingback: cialis 24 hours
  6. Pingback: sildenafil online
  7. Pingback:
  8. Pingback: viagra nz
  9. Pingback: cialis precio
  10. Pingback: red viagra tablets
  11. Pingback: canadian viagra
  12. Pingback: viagra vs.levitra
  13. Pingback: walgreens viagra
  14. Pingback: what is viagra
  15. Pingback: sildenafilo
  16. Pingback: female viagra
  17. Pingback: viagra women
  18. Pingback: viagra walmart
  19. Pingback: sildenafil
  20. Pingback: women viagra
  21. Pingback: otc viagra