0

I can't seem to copy and paste code form posts anymore. I get one big run-on line. The newlines no longer work. I also get all the line numbers, which means the code can't compile. Is there a "toggle plain text" option so I can copy and paste into an editor and run it?

4
Contributors
16
Replies
17
Views
5 Years
Discussion Span
Last Post by Dani
0

OK, I do that and the line numbers go away, but I still have one massive line and I have to add a line return in an editor after every line. Does anyone else have to do this?

0

Bump. I can do it on Firefox and that's what I'll do from now on. Just wanted to know if anyone had the same problem on the copy and paste on IE 8.

0

It's the view with IE8/XP rather than what's being posted. IE9/W7 shows fine as does Chrome etc. How about posting a screenshot?

0

Oooh I see what you mean. I am able to duplicate this problem in IE8 although it works fine in IE9. Looking into it ...

0

This is happening because we use jQuery's text() function to fetch the plaintext version. According to http://api.jquery.com/text/,

Due to variations in the HTML parsers in different browsers, the text returned may vary in newlines and other white space.

Does anyone know of a workaround?

0

Third time's a charm? Having problems uploading the screenshot.

daniwebscreenshot2

EDIT -- I can't seem to simply attach it without putting it in the post itself. Hopefully you can see what I mean though.

Edited by VernonDozier

0

Yep, .text() seems to be the culprit. The link you posted Dani has a /, at the end so it goes to an unknown page. However, reading through the comments, it seems that this is a known issue and has been for at least two years. I'm surprised jQuery have not remedied. Barius seems to have made some headway with this using .html() near the bottom of the discussion. I don't know whether this would be of any use.

Edited by diafol

0

Sorry for the broken link. html() has the same problem that text() does in old versions of IE.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.