Получить пользовательский текст

const getSelectedText = () => window.getSelection().toString();
Tired Tortoise