| | |
Code line numbers - causing paste problems
![]() |
Still investigating a solution. In the meantime, I've confirmed the problem is not with the web browser but rather with your editor. When using Firefox 2 and Windows Vista, I was able to copy/paste just fine into Notepad but I got line numbers when copy/pasting into Zend PHP Studio.
Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
FireFox1.5 into VEdit -- line numbers.
FireFox1.5 into Notepad -- line numbers
Firefox1.5 into Wordpad -- line numbers
IE7 into VEdit -- one line, no formatting
IE7 into Notepad -- one line, no formatting
IE7 into Wordpad -- no formatting
Opera9 -- seems to work.
I see no reason for line numbers either. I doubt it's worth the trouble to track down the solution. And it would be too presumptuous to require a specific browser.
It would also be beneficial IMO to put back the label "code" and the lines above and below the code. Don't have to change the code format, just the head and tail.
FireFox1.5 into Notepad -- line numbers
Firefox1.5 into Wordpad -- line numbers
IE7 into VEdit -- one line, no formatting
IE7 into Notepad -- one line, no formatting
IE7 into Wordpad -- no formatting
Opera9 -- seems to work.
I see no reason for line numbers either. I doubt it's worth the trouble to track down the solution. And it would be too presumptuous to require a specific browser.
It would also be beneficial IMO to put back the label "code" and the lines above and below the code. Don't have to change the code format, just the head and tail.
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
I went ahead and implemented the same workaround DevShed uses that Dave suggested. Of course it's not that elegant ... but let's see.
Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Thanks Ancient!
Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
I second that. It wasn't that the line numbers were bad, but if they interfere with my ease of copying and pasting, then it becomes more a nuisance. This solution is great.
"Technological progress is like an axe in the hands of a pathological criminal."
All my posts may be freely redistributed under the terms of the MIT license.
All my posts may be freely redistributed under the terms of the MIT license.
I went ahead and implemented this in our code snippet library as well. Here is an example:
http://www.daniweb.com/code/snippet582.html
You'll notice that with the line numbers, when code is too long for the line, it very cleanly wraps around with the line number indicating it's just a wrap around. I think this is a lot nicer than the messy horizontal scrollbars, especially with very long snippets.
http://www.daniweb.com/code/snippet582.html
You'll notice that with the line numbers, when code is too long for the line, it very cleanly wraps around with the line number indicating it's just a wrap around. I think this is a lot nicer than the messy horizontal scrollbars, especially with very long snippets.
Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
I think this will work. Can you tell how many line are in the code block? If so, could you please add the toggle to the top of the block also if the block is greater than, say, 30 lines? If not, just add the toggle to the top. Many times people post 2 or more (window) pages of code and if we see something we wish to comment on at the top, we have to scroll all the way down, then all the way back up. This would also delineate the block nicely.
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
I actually went ahead and decided to allow the code to be as long as it needs to be. I found the scrollbars incredibly annoying. I prefer to read code the same way that I do everyday in my IDE ... by utilizing the full height of my monitor, as opposed to being forced to only see a couple of lines of code at a time. I think it has something to do with me not having a photographic memory.
Dani the Computer Science Gal 
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds

Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
![]() |
Other Threads in the DaniWeb Community Feedback Forum
- Previous Thread: User Control Panel not working
- Next Thread: formatting playing up
Views: 4382 | Replies: 22
| Thread Tools | Search this Thread |
Tag cloud for DaniWeb Community Feedback
+ abuse beginners bookmark bored box bug bugs calamity code codebox codesnippets codetags code_snippet comments complaining cpuintensive daniweb design editcodesnippet end-of-the-world favouriteforums feedback ff3 flamewar glitch ie6 itsatag! kids layout login lulz negative newfeature pm poll post preview privatemessaging problem profanitytest profile quality quick rash-bot rashakil-fol reply reputation reputation-power sandwich score search snippet so-what socialgroups solvedthreads spam sub-forum suggestion tagcloud tagging tags theactualrulerofthetag-cloud:3 therulerofthetag-cloud:[ thread threadtagging today's-posts unansweredposts upgrade user voting whining who-cares yada-yada






