/html-dom /Basic
GitHub 4932★

Get the selected text

const selectedText = window.getSelection().toString();

See also

Follow me on and to get more useful contents.