viewpoint-particle

Author Topic: Code highlighting and copy paste  (Read 5739 times)

....IFICantBYTE

  • Full Member
  • ***
  • Posts: 120
Code highlighting and copy paste
« on: June 13, 2013, 08:42:17 pm »
Deana or Tony,
this new board is great, but I noticed that when I try to copy example code (like your RSS feed example Deana) and paste it into WinBatch Studio, it all comes in as one line.. ie. there are no CRLFs at the end of each line, even though it looks fine in the web page.
I noticed you are using Geshi to colour the code... I tried some Winbatch code on the Geshi web site: http://qbnz.com/highlighter/demo.php
and it seemed to output coloured code I could copy/paste ok into Studio, so perhaps you can change the new WB forum to do whatever they are doing? Or perhaps add a "Copy Code" button next to any posted code that could then format it nicely for a clipboard copy/paste?

Regards,
....IFICantBYTE
 
 
Regards,
....IFICantBYTE

Nothing sucks more than that moment during an argument when you realize you're wrong. :)

kdmoyers

  • Sr. Member
  • ****
  • Posts: 291
Re: Code highlighting and copy paste
« Reply #1 on: June 14, 2013, 05:05:49 am »
I noticed that when I try to copy example code (like your RSS feed example Deana) and paste it into WinBatch Studio, it all comes in as one line.. ie. there are no CRLFs at the end of each line, even though it looks fine in the web page.
Funny, I just did exactly that, and the code came in fine -- all on separate lines, ready to run.
Wonder what was different?  Maybe browser? I'm on Chrome.
-Kirby
The mind is everything; What you think, you become.

JTaylor

  • Pundit
  • *****
  • Posts: 1046
    • Data & Stuff Inc.
Re: Code highlighting and copy paste
« Reply #2 on: June 14, 2013, 07:21:46 am »
I get line breaks copying/pasting from Firefox.

Jim

stanl

  • Pundit
  • *****
  • Posts: 951
Re: Code highlighting and copy paste
« Reply #3 on: June 14, 2013, 07:32:28 am »
Works fine in IE 10

td

  • Tech Support
  • *****
  • Posts: 3103
    • WinBatch
Re: Code highlighting and copy paste
« Reply #4 on: June 14, 2013, 07:39:35 am »
We tested syntax highlighting with the latest versions of Safari and Opera along with IE, FireFox, and Chrome before we announced the new board. All passed line breaks to WinBatch Studio.   
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

....IFICantBYTE

  • Full Member
  • ***
  • Posts: 120
Re: Code highlighting and copy paste
« Reply #5 on: June 15, 2013, 01:48:16 am »
Hmmm... just tried it on a different PC and it worked fine as you say... weird.. it just didn't work (tried many times) on my usual PC at work.
Will try again on Monday.
Sorry to bother you.. must be something on that particular PC set differently somewhere.

Regards,
....IFICantBYTE
Regards,
....IFICantBYTE

Nothing sucks more than that moment during an argument when you realize you're wrong. :)

....IFICantBYTE

  • Full Member
  • ***
  • Posts: 120
Re: Code highlighting and copy paste
« Reply #6 on: June 17, 2013, 08:44:32 pm »
I can't work out exactly what is doing it.. but it is still "broken" on my usual work PC.

Something is making IE9 put the copied text (from the colorized div) on the clipboard without any line breaks.

I've been looking on the web, and there are a million different postings in various forums about very similar issues, but none of the solutons I've seen and tried have worked or directly apply to me.

For me, a temporary way around it is to load this forum using IE's compatibility view and then clipboard copy/paste worked with line breaks, so I can live with that for now until I find the real culpret.

Regards,
....IFICantBYTE
Regards,
....IFICantBYTE

Nothing sucks more than that moment during an argument when you realize you're wrong. :)