On linux X11 this is done with "targets". So essentially your browser, or any app, exposes a few different varieties of the same content e.g text/html as well as text/plain. If the app you paste into, requests text/plain, then you will get it without formatting.
In fact even file copying is done this way, it copies the list of filenames as type application/file-list or something of the sort.