-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 unformatted text removes formatting and converts heading to paragraph #16990
Comments
I'm able to reproduce in the editor included with WordPress 5.2.2 but not with Gutenberg active and built from the latest master branch. @oxyc can you try again using the latest master branch? |
To clarify, I'm not testing using the playground against Master but am using the build from master tested in a WordPress install. There may be a variation between GB in playground and in a WP environment that may be contributing to this then. |
This also happens with the plugin for me. Tested in Safari, Chrome and Firefox, all of them behave the same. I ran these steps to build the plugin:
|
Just saw there's apparently https://wordpress.github.io/gutenberg/ which is built on master according to #16967 (comment). It's reproducible there too. |
I've tested this locally and am having a similar problem, please find a screencast attached. Testing environment
Build environment
Console output
|
The problem is that we always force Regardless, whatever it did fix, we should find something better, because enforcing |
Found it. This code was added 2 years ago to tigger embedding when pasting a URL on an empty line. #3326 I'll work on a fix now. |
This issue is also a blocker for me to introduce splitting to captions. Without a fix you wouldn't be able to paste in an empty caption. |
Describe the bug
If I paste an unformatted word (eg. copied from the URL bar) into an empty heading block or a paragraph with styling applied, all styling is reset and the block is converted to a paragraph.
To reproduce
Same happens if you paste it into the styled placeholder paragraph block in Media & Text.
Expected behavior
If I paste an unformatted word I would expect it to keep the previous styling and block type rather than resetting everything to an unformatted paragraph.
Desktop (please complete the following information):
Additional context
This works as expected with v4.7.1 and v5.5.0. It does not work in v5.9.1, v6.2.0 and master branch.
The text was updated successfully, but these errors were encountered: