Gutenberg: Pasting Microsoft Word content on Google Chrome for macOS creates an image block rather than text.

Created on 4 Feb 2018  路  9Comments  路  Source: WordPress/gutenberg

Issue Overview

Gutenberg now supports pasting pre-formatted content from Microsoft Word in most web browsers.

However, when I use Google Chrome on MacOS, pasting pre-formatted text from Microsoft Word creates an image block of text rather than the expected, editable text. All of my Google Chrome extensions are disabled.

Steps to Reproduce (for bugs)

  1. Open a document in the latest version of Microsoft Word for MacOS.
  2. Copy contents of document.
  3. Paste into Gutenberg editor, using Google Chrome for MacOS.
  4. The text gets pasted as a block image. Te text cannot be edited in anyway, the content is unusable as a block image rather than workable text.

Expected Behavior

Content pasted from Microsoft Word should show up as formatted text, it should behave in a similar manor as it did in the classic editor. Images, text, and other elements copied from Microsoft Word should be handled properly rather than just turning the entire copied document into a giant image.

Current Behavior

Copied text gets pasted as a block image. Te text cannot be edited in any way, the text content is converted to an image rather than pasted as workable text.

Screenshots / Video

Result of pasting a sample document into gutenberg (It is pasted as an image block rather than useable text):
Paste
Paste issue
I have this problem regardless of the amount of text I copy. Even just copying one letter from word gets pasted as a letter in WordPress.

Here is a GIF that demonstrates my problem: https://i.imgur.com/VqNtz6o.gif

More info

Using MacOS High Sierra, with latest version of Microsoft Office 2016 for Mac. Copied into Google Chrome. Site I run: http://www.mdinvasives.org

Edit:
I discovered that "Paste and Match Style" does not have this issue.

All of these browsers are experiencing this issue on MacOS High Sierra for me:

  • Google Chrome v64
  • Google Chrome Canary v66
  • Opera v50

This issue does NOT affect:

  • Google Chrome for Windows 10
  • Firefox for Windows 10
  • Firefox for MacOS
  • Safari for MacOS
[Feature] Raw Handling [Type] Bug

Most helpful comment

All 9 comments

Hmm, interesting.

MS Word should be supported: https://github.com/WordPress/gutenberg/blob/95d6c39ae7e71f565c38bacb6813503bee9c2c69/blocks/api/raw-handling/readme.md

Does this only happen when the document contains an image?

Thank you for the reply @WPprodigy.

Still coming out as an image block on my Google Chrome for MacOS with all extensions disabled. I do not have this problem with:

  • Google Chrome for Windows 10
  • Firefox for Windows 10
  • Firefox for MacOS
  • Safari for MacOs

Removing images from the document had no effect. All my Google Chrome extensions are disabled.

https://i.imgur.com/zTH7smk.png

Just copying one letter and pasting in WP creates an image block for me.

I'm still investigating if this is a WP problem or something about my setup. I don't have another MacOS install to test.

Edit: I discovered that "Paste and Match Style" does not have this issue. Here is a GIF that demonstrates my problem: https://i.imgur.com/VqNtz6o.gif

All of these browsers are experiencing this issue on MacOS High Sierra for me:

  • Google Chrome v64
  • Google Chrome Canary v66
  • Opera v50

This issue is occurring for me, as well as my coworkers, in the latest version of Word for Mac + Chrome. It is reproducible with a new, blank Word doc with just text content.

I'm not certain if this is a Gutenberg bug per se or if it is actually occurring at the Webkit level (since Opera is also affected).

Apologies鈥擨 meant the Blink engine, not Webkit.

Worth noting that this issue is not a problem when using the classic editor or using "Paste and Match Style".

Although it may partly be an issue with the Blink engine, Gutenberg is handling the pasted content differently in a way that led to this issue.

Te text cannot be edited in any way, the text content is converted to an image rather than pasted as workable text.

Huh, I've never seen this before. I have tested Word a few months back, and didn't see this happen. I'm starting to suspect that Word supplies a file as well as plain text and rich text, and that this file gets processed first and stops further processing, the assumption being that, if there is a file, it is not text paste. A workaround might be to look if there is any text present.

11683 Related to this

Was this page helpful?
0 / 5 - 0 ratings

Related issues

youknowriad picture youknowriad  路  3Comments

mhenrylucero picture mhenrylucero  路  3Comments

jasmussen picture jasmussen  路  3Comments

ellatrix picture ellatrix  路  3Comments

davidsword picture davidsword  路  3Comments