Code Notes

Get selected text

document.onselectionchange = () => {
  const text = document.getSelection().toString()
  console.log(text)
}
Available for work from mid-July 2026.
Hire me before someone else does.
Get in touch