Open gregsullivan opened 1 year ago
You may need to paste the example sentence into a text editor and then into Gutenberg to ensure the HTML tags are parsed and not simply displayed.
Hey there @gregsullivan - would it be feasible to clean up your Word documents to strip out the empty tags before pasting it into the editor?
Hello @kathrynwp!
It would be feasible for me to clean up my client's Word documents, but not feasible for my client without adding meaningful time to the process of publishing articles on their website. They will be maintaining the site themselves beginning in July.
I don't expect this to be fixed by then, so I'm planning to write up instructions for how to paste from Microsoft Word to WordPress, covering:
They are non-technical users, so this is asking a fair bit of them.
Hi! Could you share what is logged in the console when you paste the content? https://balsamiq.com/support/faqs/browserconsole/
Hi Ella! Here you go:
From use-paste-handler.js:103
:
Received HTML:
From use-paste-handler.js:104
:
Received plain text:
The following space:<em> </em>will be <em>removed</em>.
From paste-handler.js:64
:
Processed inline HTML:
The following space:will be <em>removed</em>.
My environment has updated to:
Thanks for looking at this, and for all your work on WordPress 6.3 (and beyond)!
Description
When pasting content into the block editor, elements containing only whitespace are removed. For example, the following pasted line:
is modified as follows on paste:
Stripping the tags makes sense to me, but I believe the whitespace should be retained.
I am encountering this on a magazine website where the content is pasted from Microsoft Word. The document is full of
<i>
elements containing only spaces, remnants of the editing process. These are removed on paste, merging words throughout the document.Step-by-step reproduction instructions
The following space:<em> </em>will be <em>removed</em>.
Screenshots, screen recording, code snippet
No response
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes