Obtenha o texto selecionado
const getSelectedText = () => window.getSelection().toString();
Tired Tortoise
const getSelectedText = () => window.getSelection().toString();