-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
1.9.1: Classic "Visual" editor litters Gutenberg markup w/ superfluous `<p>´ tags #3901
Comments
@norewp next step here is to test my two bug scenarios w/ the freshly released 1.9.0. |
Tested on 1.9.0, situation is exactly the same. |
Making a note to test this behavior in #4005 if we move in the direction of client-side wpautop . Seems this is where things are likely breaking down. Alternatively the selective Lines 193 to 232 in 6a287a4
|
Perhaps a better alternative would be to turn wpautop off when editing Gutenberg posts in the classic editor. Leaving the |
This exists already: Lines 126 to 141 in 91dd36c
See: #2708 But we still conversely need to turn wpautop on selectively for legacy posts when loading the Gutenberg editor. |
The root cause here appears to be in TinyMCE's content serializer during content initialization, which converts the comment demarcation sequence to a new paragraph node: Off the top of my head, a couple ideas:
cc @spocke |
Confirmed, also made a fiddle: http://fiddle.tinymce.com/0hgaab/9 Imho both comments and following line breaks should be ignored when forcing root blocks in TinyMCE. There shouldn't be difference between:
and
|
Tested broken on 2.2.0. EDIT Tested broken 2.3.0. |
Closing in favor of #6385 (comment), which has a proposed solution. |
Just to follow up here for at least my own records, 3.1.1 shows improvement.
v2.x
v3.1.1 (=== 3.3.0, 3.2.0)
|
Yes, this is tracked with #4456 |
(EDIT still broken in 2.3.0)
(EDIT 2018-07-04 improved in 3.1.1, shortcodes still broken)
(EDIT 2018-07-21 ^^^^ 3.3.0)
Issue Overview
Classic "Visual" editor litters Gutenberg markup w/ superfluous
<p>
tags.This is an issue where occasionally the user might have to revert to using the classic editor, due to Gutenberg metabox rendering JS crashing for whatever reason. Even if the user doesn't touch the content block at all, just loading Gutenberg markup in classic Visual editor will cause it to break on Update.
I do not have Classic Editor plugin activated. Unless this is officially going to be a "run Gutenberg" requirement, I probably shouldn't have to activate it, right?
Steps to Reproduce (for bugs)
Expected Behavior
Gutenberg markup stays intact
Current Behavior
Littered markup result - shortcodes are wrapped into
<p>
tags, all block marker comments empty lines get replaced w/<p> </p>
:Possible Solution
Not sure which component is the responsible party - core or Gutenberg - could use pointers.
Screenshots / Video
Related Issues and/or PRs
Maybe #3900? Not sure, could use pointers.
The text was updated successfully, but these errors were encountered: