Select Numbers in Ordered List

I have some ordered lists on a webpage. When I select the list and copy it, I want the numbers to appear when I paste the content in a textbox. Right now, it just pastes the text without any mark to show a new line.

How can I include the numbers when I select and copy the list?

Are you just copying the text from the browser display? It won’t work, because the numbers are not part of the text. They are generated by the browser. To be copyable text, the numbers would have to be in the text itself. E.g. in an UL, you’d have

  <li>1. first</li>
  <li>2. Second</li>
  <li>3. Third</li>

Then you’d have to style the UL not to include the default dots. Bit of a mess, really.

Actually this is browser dependent, some some browsers copy their out put as plain text some dont.

A SIMPLER SOLUTION: COPY to a file that RTF format, then convert that to plain text if needed

As Ralph pointed out the #s ( or bullets in OLs) aren’t really part of the content TEXT, and the context of UL/OL doesnt get copied into plaint text, but it does into Rich Text.

If you are coding and worried about it not retaining the #s you could do something like this:

ol{list-style: none;   counter-reset:items;}
li {counter-increment: items}
li:before {content: counter(items) ". ";}

	<li>longer sample item</li>