-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Opening Gutenberg post in Classic Visual editor adds unwanted <p> </p> content #6385
Comments
Specifically, if you start out with the following in the Text editor:
Switching to the Visual Editor and then back to the text editor leaves you with this:
Here's a GIF of the behavior: |
This is not related to To fix this we need to fix the white space between HTML comments when loading the content in TinyMCE, something like:
And of course restore that on saving and switching to the Text editor with:
Edit: actually it makes sense for this to be in core right now. It's a bugfix there too. Created https://core.trac.wordpress.org/ticket/44308, will make a patch. |
@azaozz I tested this locally against my wordpress-develop checkout:
However, the issue still manifests: Is there some other step I'm missing? |
Testing TinyMCE in |
Even clearing browser cache didn't work for me! Opening in incognito did though. |
@azaozz Do you think we can shim this into Gutenberg for a more immediate fix? |
Sure, think there was a place to add classic editor's TinyMCE fixes somewhere. If not, will have to make a tiny TinyMCE plugin :) |
See #6385. Same fix as in core, see https://core.trac.wordpress.org/ticket/44308. TODO: remove this after WordPress 4.9.7 is out, this should be in it.
👍 Looks like |
* Fix Classic Editor adding paragraphs from block boundaries See #6385. Same fix as in core, see https://core.trac.wordpress.org/ticket/44308. TODO: remove this after WordPress 4.9.7 is out, this should be in it. * Fix variable typo
Issue Overview
For GB 2.7:
I don't think gutenberg_disable_editor_settings_wpautop is working as expected. I would hope that it would prevent editing a GB post with the classic editor would prevent it from changing all the blank lines between the GB blocks into <p> </p> which then add lines and show up in GB as a Classic block.
Steps to Reproduce (for bugs)
Expected Behavior
Current Behavior
Possible Solution
Maybe changing the priority of the gutenberg_disable_editor_settings_wpautop filter?
Screenshots / Video
Related Issues and/or PRs
Todos
The text was updated successfully, but these errors were encountered: