WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 6 weeks ago

#40723 new defect (bug)

Pasting Word content - then trying to remove tags via WYSIWYG - does not work

Reported by: karlgroves Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.7.4
Component: Editor Keywords: reporter-feedback
Focuses: administration Cc:
PR Number:

Description

WordPress 4.7.4

Some background: In the default configuration of the built-in editor, selecting & highlighting text allows you to apply things like bold, underline, italics, etc. to your content. You can also select & highlight that same content to undo the bold/ underline/ italics. Furthermore, you can create content that features these changes to the text, save the post, come back, and undo it.

Unless it is pasted from Word.

Steps to Reproduce:

Using the "Visual" tab: Paste content from MS Word (Mac 2011) which features bold/ underline/ italic text.

This results - quite shockingly - in pretty clean HTML being pasted in. (This probably requires a relatively "clean" Word document using only built-in styles.)

Select the "HTML" tab in the editor. Inspect the HTML generated. It will feature pretty clean HTML and, in this use case, good ole 'strong', 'u', and 'em' elements.

Next, attempt to "un-bold"/ "un-underline"/ "un-italicize" the text.

Expected Result:

The 'strong', 'u', and 'em' elements are removed just as they would be if we'd edited the content directly in the editor instead of pasting.

Actual Result:

The content remains unchanged

Change History (1)

#1 @pento
6 weeks ago

  • Keywords reporter-feedback added

Thank you for the bug report, @karlgroves!

I don't have a copy of MS Word handy, would you be able to confirm if this is still an issue in the block editor?

Note: See TracTickets for help on using tickets.