Let's suppose I'm making some kind of markdown something like a stack-over-flow markdown. I want to get selected text from input and do some action with it
something like this!
Here The Selected Text is Hello
you can use
window.getSelection().toString()
it'll get the highlighted or selected text within the page