21:41 | <Cory> | right place to ask a spec question/comment? this is about selecting and copying arbitrary text from an html page. often, content and styling makes sense for the screen, but doesn't translate when pasted as plain-text. as an example, if i copy those room notifications immediately above ===^ it will paste the text "Today" instead of a timestamp. the img tag has the alt attribute which (among other things) provides a text representation for the clipboard -- has there ever been any discussion around expanding that to a global element attribute? or providing a mechanism for helping the browser convert an arbitrary selection on the page to plain text (without having to use js)? |
21:43 | <Andreu Botella> | something that doesn't require JS, I don't know, but you can customize what gets copied into the clipboard with the clipboard API |
21:43 | <Andreu Botella> | https://www.w3.org/TR/clipboard-apis |
21:51 | <Cory> | that's great for specialized situations but creating something that allows arbitrary selections would be difficult. ...and i guess expanding alt to non-images would be difficult for the same reasons, like partial selections. i donno. copying/pasting text from pages sucks though, ha |