Main Site Documentation

Documents copy text


#1

Not a big thing but is there a way to copy a bit of code from one of the documents without getting the line numbers?

Tried with IE and Chrome but line numbers always in copied text…

Sort of a pain in the…


#2

Good point, we will look into this.


#3

That would be nice.


#4

Can you give an example. In Chrome I opened https://www.ghielectronics.com/docs/7/digital-outputs
Selected and copied one of the example blocks of code, and pasted it into notepad++ I didn’t get the line numbers?


#5

@ Jeff -
try any code from CodeShare and it will copy the line numbers… using IE… :slight_smile:

Oh and your link copies the line numbers for me as well, using IE 11 Windows 8…

btw: no one uses Chrome dude :slight_smile:


#6

FWIW, Line numbers are not copied when pasting copied code into Notepad or WordPad. When you paste directly into the VS IDE Code Window the line numbers are also pasted.

I always paste into Notepad, Select All, Copy then paste into the VS IDE.


#7

@ Jeff -

I have notepad++ but did not try using it.
Just Browsers, Openoffice and print to XML

I try and send what I get

As a note I am using windows 8 64 bit…

Text as copied from the link containing
Here is the code using the I/O pin 47 (on FEZ Spider)

From Here is the code using the I/O pin 47 (on FEZ Spider)
into the latest version of Notepad++

using System.Threading;

using Microsoft.SPOT.Hardware;

using GHI.Hardware.EMX;

namespace change_this_to_your_namespace

{

  1. public class Program

  2. {

  3.  public static void Main()
    
  4. {
    
  5.     OutputPort LED;
    
  6.     LED = new OutputPort(Pin.IO47, true);
    
  1.     Thread.Sleep(Timeout.Infinite);
    
  2. }
    
  3. }

}

From Here is the code using the I/O pin 47 (on FEZ Spider)
into Windows Notepad

using System.Threading;

using Microsoft.SPOT.Hardware;

using GHI.Hardware.EMX;

namespace change_this_to_your_namespace

{

  1. public class Program

  2. {

  3.  public static void Main()
    
  4. {
    
  5.     OutputPort LED;
    
  6.     LED = new OutputPort(Pin.IO47, true);
    
  1.     Thread.Sleep(Timeout.Infinite);
    
  2. }
    
  3. }

}

Could be just me but I do not know why…

Thanks for responding to my question.


#8

Update to my question…

My Windows 7 died a few days ago so I borrowed my granddaughters Window 7.

Using Windows 7 the code copied without the line numbers so my problem is somehow related to my Windows 8.


#9

@ willgeorge, I have the same result as you using Win7-64 using IE. I tried it in Firefox and it does not copy the line numbers.


#10

Update:

I have found a way to correct the line number copy issue using Windows 8 IE 10.0.10.

I used Tools Browser Mode: IE10 Internet Explorer 10 Compatibility View


#11

I have the problem with or without compatibility mode in Windows 8 64 bit IE 11 here is a screenshot that should help.


#12

@ Jay Jay -

My IE is Version 10

See image…

I had version 11 but rolled back to 10 for some reason. I forgot why I did but it was not related to copying of text.

Roll back was a bad term… I did a restore to earlier time.


#13

The line numbers and code are split into two columns (not visible). Since they look the same I assume you are selecting it all together. When in IE, if I start selecting from the left of line one all the way to the last line and paste into VS I get line numbers. If I select the second column (the code) starting with to the left of “using” all the way to the last closing bracket and paste into VS I get no line numbers.


#14

Hmm. I have just tried with codeshare and still getting line numbers:


#15

@ Josh - Have you tried duplicating with Windows 8 64 bit, seems to be a common thread? I

@ everybody following this thread - please let us know if you are having the problem and are [em]not [/em]running windows 8


#16

@ Josh -

[ol]I’m running Win 7 64 bit
I’m running I.E. 10
chrome: Version 30.0.1599.69 m
I tried both codeshare and the Digital Ouput tutorial
[/ol]
What I found:

[ol]Chrome select in code block, select outside (left or right): No lines nunmbers in VC (12) or notepad++
I.E. in code block: no lines; outside code: get line numbers in notepad and VC[/ol]


#17

Win7 64bit

Chrome 30.0.1599.69 m DOES show line numbers, but copies without line numbers in notepad
IE 11.0.9431.194IS shows no line numbers, and copies without line numbers in notepad
FF 14.0.1 shows no line numbers, and copies without line numbers in notepad


#18

Better now. (to bad we can’t keep numbers on the web, though)


#19

@ Josh -

I assume you are selecting it all together.

I make sure that the line numbers ‘appear’ to be not selected. It still copied the line numbers.