Delete text from copied text
- by riddle
Hello,
I would to use JavaScript to clean up text that’s being copied from my site.
I use snippets like this:
body {
vertical-align: middle; ?
}
Where ? indicates comment later on. I want readers to copy this snippet and use it – so I need to delete that Unicode marker. How can I access text that’s being copied and make changes to it?
I considered deleting marker(s) from snippet when user clicks (mousedown) on it, so she could select the text, copy it and then I would restore markers but it seems a really long way to do it.