🔤Text selection 9 Jun 2023 1 min read Edit on GitHub javascript const selection = window.getSelection() const selectedText = selection.toString()