Yo,
Alright been noodling on this one for a while: How copy/cut styled text without bringing along any style baggage (background-color, color, etc)?
Couple of routes of attacks that have been foiled:
- Style the text differently using ::select? Doesn't work, ::style isn't copied
- Style the selected text using jQuery's select binding This only works for inputs, not p, divs
- Intercept and remove style by binding an event to copy/paste using jQuery? Can't access the copied object to remove stuff, tried using e.preventDefault(); then returning the event object but that didn't work either
- Modify the clipboard data once it's been saved? Also no dice, most browsers wont let you into this without flash and some sort confirmation
Anyway, thoughts? Seems like it would be very useful for sites that have white background colors.