-
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
Should Gutenberg continue to automatically add <p> paragraph tags? #4446
Comments
See #4672 (comment) |
You may wish to add why you can’t use the other block types to achieve what you could happily do in the Classic text editor. I recently discovered, though I’ve not raised an issue yet, that the Custom HTML editor has its own ideas about what you can do! |
I have over 10,000 CPTs that have been created using the Classic text editor. The issue is that when I activate Gutenberg and then open one of the CPTs the Users should be given a third option as to which editor they would like to use: Visual Editor, Code Editor or Classic Text Editor (as in New lines remain as new lines, they do not get converted into Not everyone uses WordPress for blogging! |
Can you verify whether this is the same issue described at #3901 ? |
@aduth I'm not sure that it is the same.
I personally never use the Visual Editor and I'd like to have full control over what HTML I use in my posts. |
Okay, so I believe I understand better now. This is expected in current incarnation of Gutenberg, as it does not perpetuate the classic editor's assumptions of Whether we still want to add wpautop as an optional support is another question. I could, for example, imagine a separate mode which is not strictly HTML, but this mixed wpautop behavior. |
Personally, I always really disliked the magic invisible paragraph tags of |
This also has implications when hiding/showing more text within a certain length on the front-end if the post content is wrapped with |
@cr101 Presumably, shouldn't something that counts content length in a post ignore HTML tags? At least, that seems like the proper way to do it. Adding/removing |
We are building a headless WordPress web app using React and the WordPress API. Therefore, displaying the content on the front-end will not be consistent. |
Which front-end editor are you referring to? To be clear, you could pass |
Sorry, I was referring to the consumer front-end of the web app. A lot of our content is created outside the WordPress admin. |
At this point, the answer is yes: paragraph tags will continue to be added around text that's historically been magically transformed by |
@danielbachhuber From a consistency point of view, will the content of a post created through the WP REST API be automatically wrapped in |
This is something we could consider if you'd like to open a core Trac ticket. |
Any updates on this ? The fact that Gutenberg elects to add |
@rstmsn That's exactly the frustration I've been having with using Gutenberg. The |
@cr101 agreed. Is this being discussed elsewhere ? Seems like a rather glaring issue to me... |
@rstmsn Not sure if it's discussed anywhere else. Gutenberg is very frustrating and time consuming to use so I will not be using it for for a few years. Currently using the Classic Editor plugin instead. |
Can you clarify in what cases you see no For paragraphs, I cannot reproduce the missing For classic block, the block mimics pre-5.0 behavior, where the omission of paragraph tags has existed since 2003 (the "autop" behavior). See: https://developer.wordpress.org/reference/functions/wpautop/ |
When I disable visual editor and code editor is my only option. I have the following two paragraphs written in code editor:
|
Here a ticket in Trac which I found somewhat related to this. This is not exactly the same as this one, but could well be considered as related. When there is no attribute set for the To my understanding the following line is doing the trick (removing the
Any specific reason Gutenberg is replacing |
My team is also affected by this decision, as it happens when they switch between the Code and Visual editors in the Classic block in Gutenberg. I would also like to be able to prevent the tags from being added in the first place. |
I'm using Gutenberg 2.0.0 Code Editor
When I open a CPT that I created with the Classic Text Editor the post content is automatically wrapped with
<p>
tags.Is there a way to tell Gutenberg to not automatically wrap the content in
<p>
tags as I don't want any html tags in the database?Since I'm using the Code Editor instead of the Visual Editor I except to have full control over the use of HTML tags.
The text was updated successfully, but these errors were encountered: