LeaVerou / dabblet

An interactive CSS playground
http://dabblet.com
817 stars 148 forks source link

pasting   doesn't actually paste   #243

Open arlenreyb opened 10 years ago

arlenreyb commented 10 years ago

It just pastes an empty space. It doesn't matter if you're pasting just " " or if you're pasting a big, long page of text that happens to have a " " in there somewhere, dabblet will seek it out, and remove it, and replace it with a space.

As you may know,        does not equate to 6 empty space in html. But if I pasted "      " in to dabblet, it would turn in to 6 empty spaces, and therefore only actually display as one space.

arlenreyb commented 10 years ago

Wow, I can't even paste & n b s p ; in the bug tracker...

arlenreyb commented 10 years ago

It's not just nbsp;

All html entities starting with & automatically change to what they're supposed to be in the html view, but only when they're copied and pasted in. Like ¢. If they are manually typed out, they display as "& c e n t ;" (without the spaces). But then if you copy that code, and paste it, it pastes as the character cent character, instead of the code. This isn't such a big deal with a character like ¢, but it is a big deal if you're using nbsp; to space things out in your code, because when it converts the nbsp; code back in to the space character, it truncates it if there's more than one.

Man, that's tough to describe. I hope I was clear enough.