3 ms·
> Google Docs uses its own layouting system for its editor---which means, it doesn’t use browser’s contenteditable API Ah!, so that's the reason why copy-paste
by enriquto 3y ago
> Google Docs uses its own layouting system for its editor---which means, it doesn’t use browser’s contenteditable API
Ah!, so that's the reason why copy-paste is badly broken in google docs (and jupyter notebooks as well)? Now I understand the reason. It's because they didn't reimplement it again.
I can copy-paste between all my windows and firefox tabs, except google docs and jupyter notebooks. This is because the selection that they show it's not an actual text selection that the system understands, but just a hand-drawn color rectangle around the text. It's a fake selection, of sorts!
- jitl 3y agoSomeone can break copy paste in ContentEditable just as easily. All you need to do is preventDefault on the copy or paste event, and then do your own thing poorly. Basically every rich editor on the web that’s any good overrides copy/paste with custom handling.