An answer that's a bit unusual: open a blank page from which the user will copy the text:
<a href="javascript:window.open('data:text/html, <html contenteditable>sup<script>document.execCommand('selectAll'\'selectAll\')</script></html>')">
Copy the text “sup”
</a>
Just replace sup
by the text you want the user to copy.