Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pasting from Microsoft Word doesn't strip its internal styling definitions #9761

Closed
troytempleman opened this issue Sep 10, 2018 · 3 comments
Labels
[Feature] Paste Needs Testing Needs further testing to be confirmed. [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed

Comments

@troytempleman
Copy link

troytempleman commented Sep 10, 2018

Description of the bug

Copying and pasting text from Microsoft Word into the Gutenburg editor in Google Chrome gives undesirable results. The title pastes fine but when pasting the remaining text underneath the title, the first block of text gets filled with code, seemingly font styles from Microsoft Word (see https://user-images.githubusercontent.com/15160389/45310537-1400ed80-b501-11e8-9310-5eff8681ddf3.jpg).

The text does get pasted and formatted as expected but you have to scroll down underneath the first block to see it (see https://user-images.githubusercontent.com/15160389/45310546-1fecaf80-b501-11e8-97b6-8cc875161d62.jpg). You then have to delete the first block of styles to achieve the desired result.

To Reproduce

  1. Copy title Lorem ipsum dolor... from https://github.com/WordPress/gutenberg/files/2367501/Word.docx and paste into Gutenburg editor in Google Chrome
  2. Copy remaining text from Word document and paste into Gutenburg editor, underneath above title.

Expected behavior

Pasted text should retain the same formatting as in the Word document, without any extra code and/or styles being inserted.

Screenshots

screenshot-1
screenshot-2

Desktop

  • Windows NT 10.0
  • Chrome 68
  • See whatsmybrowser.org/b/YKKNBLZ for more information

Additional context

  • WordPress 4.9.8 and Gutenburg 3.7.0
@designsimply designsimply added [Feature] Paste Needs Testing Needs further testing to be confirmed. labels Sep 10, 2018
@designsimply designsimply added the [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed label Sep 10, 2018
@designsimply
Copy link
Member

Thank you for reporting this! Noting that you've tested different browsers is valuable, and I would like to consolidate this report together with #9719 as it looks the same to me. If you think this issue should remain open separately, please let me know.

@mcsf mcsf changed the title Copy and Paste from Microsoft Word into Gutenburg in Google Chrome Pasting from Microsoft Word doesn't strip its internal styling definitions Oct 21, 2018
@wouthe
Copy link

wouthe commented Aug 17, 2019

I have a similar issue showing unnecessary markup.

I used to copy text from Word to WP all the time. Now a ton of unnecessary markup shows up in Gutenberg from Word that is not even visible in word itself.

A solution to this is in Word to go to mark-up options and uncheck 'comments, ink, insertions and formatting' before copying the text.

See screenshot:
gutenberg-MSW

Can this please be fixed?

Expected behavior:

When text in word shows no formatting, after a copy/paste to Gutenberg that text should appear the same and not show markup that is not showing in word.

@designsimply
Copy link
Member

@wouthe your issue looks different enough than the one reported here to create a new issue—it looks like it could be a copy/paste of some text while in a comment or editing mode of some kind. It would be really helpful to have some additional details posted in a new issue with screenshots of both Word and WP (it's best to get the whole window, including the menu bar). Please go to https://github.com/WordPress/gutenberg/issues/new/choose and create a new issue and add your screenshot and, if possible, please also note:

  • Mac or Windows or Linux
  • Browser version you are using
  • Word version you are using (online or standalone install?)
  • When you are in Word, do you have Track Changes turned on?
  • Screenshot of the same text in the Word doc if you can get one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Paste Needs Testing Needs further testing to be confirmed. [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed
Projects
None yet
Development

No branches or pull requests

3 participants