Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Този сайт ще има ограничена функционалност, докато се извършва тече неговата поддръжка. Ако дадена статия не може реши проблема ви и искате да зададете въпрос, нашата общност е готова да ви помогне на @firefox в Twitter и /r/firefox в Reddit.

Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

Firefox copy-'n-paste of html isn't consistent accross platforms

  • 3 отговора
  • 2 имат този проблем
  • 15 изгледи
  • Последен отговор от sirlark

more options

Firefox 31 doesn't copy and paste consistently across platforms, and never copy and pastes perfectly on any platform. I've tried various test cases always using a fresh install of firefox or a new profile and copying from the same web page.

Case 1: copy from FF 31 (fresh install) on windows 7 (VM) -> paste to MS Word 2007 on windows (VM)

 Pastes as a table with font formatting (bold is preserved) but no border lines or background colours come across

Case 2: copy from FF 31 (fresh install) on windows 7 (VM) -> paste to MS Word 2007 on Linux using Wine

 Pastes as plain text with the first rows cell each on a line on their own

Case 3: copy from FF 31 (new profile) on Linux -> paste to MS Word 2007 on windows (VM)

 Pastes as plain text with the first rows cell each on a line on their own

Case 4: copy from FF 31 (new profile) on Linux -> paste to MS Word 2007 on Linux using Wine

 Pastes as plain text with the first rows cell each on a line on their own

I realise there are likely issues cutting and pasting between a host and a VM, and also I know there are issues with cutting and pasting to programs running via wine on Linux (http://wiki.winehq.org/CopyAndPaste), but those are more to do with acquiring buffers/selections, rather then mime-types. Still even Case 1 isn't perfect. Chrome copies everything, colours, fonts, cell borders, etc perfectly. It seems that firefox isn't offering the right mime-type(s) for Word to recognise?

I'll try it with LibreOffice, which I am installing now.

Firefox 31 doesn't copy and paste consistently across platforms, and never copy and pastes perfectly on any platform. I've tried various test cases always using a fresh install of firefox or a new profile and copying from the same web page. Case 1: copy from FF 31 (fresh install) on windows 7 (VM) -> paste to MS Word 2007 on windows (VM) Pastes as a table with font formatting (bold is preserved) but no border lines or background colours come across Case 2: copy from FF 31 (fresh install) on windows 7 (VM) -> paste to MS Word 2007 on Linux using Wine Pastes as plain text with the first rows cell each on a line on their own Case 3: copy from FF 31 (new profile) on Linux -> paste to MS Word 2007 on windows (VM) Pastes as plain text with the first rows cell each on a line on their own Case 4: copy from FF 31 (new profile) on Linux -> paste to MS Word 2007 on Linux using Wine Pastes as plain text with the first rows cell each on a line on their own I realise there are likely issues cutting and pasting between a host and a VM, and also I know there are issues with cutting and pasting to programs running via wine on Linux (http://wiki.winehq.org/CopyAndPaste), but those are more to do with acquiring buffers/selections, rather then mime-types. Still even Case 1 isn't perfect. Chrome copies everything, colours, fonts, cell borders, etc perfectly. It seems that firefox isn't offering the right mime-type(s) for Word to recognise? I'll try it with LibreOffice, which I am installing now.

Всички отговори (3)

more options

Hi, I just tried with LibreOffice on Linux, copying from FF 31 on the same OS, and it pastes similarly to Case 1, i.e it pastes as a table with font formatting (bold is preserved) but the font-face is not preserved, border lines are lost and no background colours come across.

So clearly FF is providing the right mime-type(s) but isn't actually conveying all the styling information.

more options

Firefox won't copy style rules that are applied from a style sheet to the clipboard. You only get inline style rules that were added via the style="" attribute.

more options

Thanks for the response, but I'm getting some styling (and it's all in CSS). For example the bolded text is specified in CSS, unless it's coming through purely because <th> tags are bold by default in Firefox.