3 ms·
We also use an Apple-style-span to wrap the copied contents to preserve the style of the copied content. And in here lies the problem with the entire appro
by Udo 15y ago
We also use an Apple-style-span to wrap the copied
contents to preserve the style of the copied content.
And in here lies the problem with the entire approach, you might even call it a misguided copy&paste philosophy. Not only does this produce a lot of clunky code that often still doesn't come out quite right, it butchers the document you are pasting into. It causes problems that are impossible to solve for users who don't know how to edit HTML source.
For example, if I copy a title header and some body text from a website into a CMS editor window, chances are I want them to appear as a title and text element that is in sync with my site's CSS. Instead, the browser tries to preserve the original style (a task at which is usually fails too). This forces users to paste that text into a plain text editor first in order to strip all formatting, and then they painfully transfer the plaintext back into the HTML editor and reformat it.
This workflow is broken and it's so easy to fix: just throw away all the "integration" code that gets triggered on paste. Everything would just magically work after that. So throwing out the Apple wrapper is definitely a step in the right direction.