Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

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

  • 3 trả lời
  • 2 gặp vấn đề này
  • 15 lượt xem
  • Trả lời mới nhất được viết bởi 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.

Tất cả các câu trả lời (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.