X
Tap here to go to the mobile version of the site.

Support Forum

preserve line breaks in text copy

Posted

I copy poetry text a lot from websites in Google Chrome. Now I am switching my browser to Firefox. When I copy a poem to put in a Word (or any other) document Firefox turns the poem into a paragraph of prose. This seems strange. Is there any way to fix it?

I copy poetry text a lot from websites in Google Chrome. Now I am switching my browser to Firefox. When I copy a poem to put in a Word (or any other) document Firefox turns the poem into a paragraph of prose. This seems strange. Is there any way to fix it?

Chosen solution

The way they construct the lines of the Greek verse is really strange. I don't think there's any built-in way to copy/paste it the way it appears on screen because it depends on style rules that are outside the selection and Firefox does not embed those rules into what you copy. Maybe an add-on could handle it -- rewrite the selection with inline styles -- but it's probably easier to use a different browser for that site.

Read this answer in context 1

Additional System Details

Application

  • User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36

More Information

jscher2000
  • Top 10 Contributor
7874 solutions 64226 answers

Helpful Reply

It sounds like the line breaks are getting lost. Here are two suggestions to try:

(1) Select a little before and a little after the content

This way, Firefox is more likely to get all the necessary HTML tags for that section of the page.

After pasting, you can remove the stray words from the beginning and end.

(2) Check for alternate formats

In Microsoft Word, below the large Paste button on the ribbon is a little triangle with the "Paste Special" option. This lists all of the different formats Firefox (or any other program you used to Copy text/images) put on the clipboard so you can select the one you prefer.

If neither of those is helpful, could you give an example of a page where you have this problem? Maybe there is something special about its formatting that we need to think about.

It sounds like the line breaks are getting lost. Here are two suggestions to try: (1) Select a little before and a little after the content This way, Firefox is more likely to get all the necessary HTML tags for that section of the page. After pasting, you can remove the stray words from the beginning and end. (2) Check for alternate formats In Microsoft Word, below the large Paste button on the ribbon is a little triangle with the "Paste Special" option. This lists all of the different formats Firefox (or any other program you used to Copy text/images) put on the clipboard so you can select the one you prefer. If neither of those is helpful, could you give an example of a page where you have this problem? Maybe there is something special about its formatting that we need to think about.
cor-el
  • Top 10 Contributor
  • Moderator
16657 solutions 150560 answers

See also:

See also: *[/questions/1192990] Can't copy batch file code from website.

Question owner

Thanks very much for replying.

The first two options didn't work.

I found that Firefox formats some web pages correctly. Here is one it is having trouble with:

https://www.loebclassics.com/view/bacchylides-victory_odes/1992/pb_LCL461.135.xml

Chrome formats the Greek verse properly (I use it in my work). Firefox doesn't. Do you think there is some workaround?

Thanks very much for replying. The first two options didn't work. I found that Firefox formats some web pages correctly. Here is one it is having trouble with: https://www.loebclassics.com/view/bacchylides-victory_odes/1992/pb_LCL461.135.xml Chrome formats the Greek verse properly (I use it in my work). Firefox doesn't. Do you think there is some workaround?
jscher2000
  • Top 10 Contributor
7874 solutions 64226 answers

Chosen Solution

The way they construct the lines of the Greek verse is really strange. I don't think there's any built-in way to copy/paste it the way it appears on screen because it depends on style rules that are outside the selection and Firefox does not embed those rules into what you copy. Maybe an add-on could handle it -- rewrite the selection with inline styles -- but it's probably easier to use a different browser for that site.

The way they construct the lines of the Greek verse is really strange. I don't think there's any built-in way to copy/paste it the way it appears on screen because it depends on style rules that are outside the selection and Firefox does not embed those rules into what you copy. Maybe an add-on could handle it -- rewrite the selection with inline styles -- but it's probably easier to use a different browser for that site.

Question owner

Thanks for trying. I guess I'll use two browsers now. ((Microsoft Edge formats the verse correctly, too—funny.) I'm done with Chrome because it marks the Loeb Classics site (!) as "not secure" now after the latest update and won't autofill my username and password. I'll use Edge for copying text from Loeb. Firefox is faster than Chrome now anyway. Chrome gets worse with every update. You start to dread them. They won't even let you turn off Automatic Update anymore or go back to a prior version. Sad.

Thanks for trying. I guess I'll use two browsers now. ((Microsoft Edge formats the verse correctly, too—funny.) I'm done with Chrome because it marks the Loeb Classics site (!) as "not secure" now after the latest update and won't autofill my username and password. I'll use Edge for copying text from Loeb. Firefox is faster than Chrome now anyway. Chrome gets worse with every update. You start to dread them. They won't even let you turn off Automatic Update anymore or go back to a prior version. Sad.