Support » Requests and Feedback » Request: Paragraph breaks in blocks

  • Hi. I have request for the Gutenberg block editor.

    As it is, hitting Enter to start a new paragraph automatically creates a new paragraph block. It would be nice if this were not the default action as it would lead to a lot of extra blocks when paragraphs within the same block will do just fine. I know we can create a new paragraph within the same block by using Shift+Enter instead, but it’d be easier if we could just press Enter. Perhaps have a block option where pressing Enter creates a new paragraph within the block?

    Thanks, and I hope you consider this request.

Viewing 15 replies - 1 through 15 (of 27 total)
  • Moderator t-p

    (@t-p)

    Try Spotlight Mode and see if you like it. It greys out all the content except the current block, allowing writers to focus on one block at a time. When it is enabled, the blocks that are not being edited will partially fade away and no block outlines will be visible.

    Do google search to learn more about Spotlight Mode.

    Hi! Thanks for the suggestion, but perhaps I didn’t explain it well.

    Regardless of what mode it is in, when using the block editor, pressing Enter in a paragraph block will automatically create a new paragraph block. I do not wish for this to happen. I would rather have multiple paragraphs within the same block. This currently can be achieved by using Shift+Enter instead of Enter, but I feel it is an unnecessary step and that we should be given an option on what pressing Enter does. (Kind of like how some messaging programs will give you the option to use Enter to either send the message or to insert a line break.)

    That said, unfortunately using Spotlight Mode doesn’t change the fact that pressing Enter will create a new paragraph block.

    Moderator t-p

    (@t-p)

    Prefer to stick with the familiar Classic Editor? No problem! The Classic Editor plugin restores the previous WordPress editor and the Edit Post screen. It lets you keep using plugins that extend it, add old-style meta boxes, or otherwise depend on the previous editor. To install, visit your plugins page and click the “Install Now” button next to “Classic Editor”. After the plugin finishes installing, click “Activate”. That’s it! For some more tips see https://www.wpbeginner.com/plugins/how-to-disable-gutenberg-and-keep-the-classic-editor-in-wordpress/

    Thank you. I already have Classic Editor installed. I am trying out the new block editor and giving my feedback on it. I think it would be better if pressing Enter did not automatically insert a new paragraph block as some people like myself might prefer to have multiple paragraphs in the same block rather than have separate blocks for each paragraph.

    Moderator t-p

    (@t-p)

    Thank you for the feedback.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Regardless of what mode it is in, when using the block editor, pressing Enter in a paragraph block will automatically create a new paragraph block. I do not wish for this to happen. I would rather have multiple paragraphs within the same block.

    That isn’t going to happen.

    For a couple of reasons, but the main point is that paragraphs *are* blocks. This isn’t some kind of arbitrary decision. WordPress creates HTML, and in HTML, the <p> tag is a block level element. Quite simply, a paragraph is a block.

    If you could put multiple paragraphs into a single WordPress block, then what would you do with that functionality? Well, you’d have a couple of P’s inside some container block. You could style that container, so that multiple paragraphs could have a single background color, or a border around them. And so on. but for that, Container Blocks are the way to go, and while WordPress itself is a bit short on container blocks right now, other plugins have stepped up and made some useful ones. The block plugin by Stackable has a Container Block. It’s pretty neat. Just a container that can hold any other set of blocks.

    But as for the act of writing, it makes no difference to you or anybody else if a paragraph is a block or not. Well, it does make one difference. With paragraphs being two blocks, you can move stuff in between them, like images. This is important because images can float to the left or right, and have the text wrap around them. If the paragraphs were all in a single block, then you couldn’t put an image block in between them.

    Separating things into blocks is the *goal*, not something to be avoided. So no, paragraphs will be staying as single paragraph blocks.

    BTW, shift-enter inserts line breaks <br>. It doesn’t make multiple paragraphs in a block, it makes all your post into a single paragraph with line breaks in it.

    Thanks for the suggestion for Stackable. I might try that out.

    But as for the act of writing, it makes no difference to you or anybody else if a paragraph is a block or not.

    There is one difference though. If two paragraphs are in two separate blocks, then I can’t select half a paragraph and a full paragraph at the same time. I’m forced to select complete blocks only.

    This is important, because often multiple paragraphs are one “logical” unit. I think the core of what @gokumew2 is saying that sometimes several paragraphs are a whole, and it’s disorienting for them to be treated separately.

    Personally, I don’t think <p> should be a block level element. Writers like me don’t regard paragraphs as “blocks” – just a pause in thought. When writing a 1,000 word article, everything flows together. It’s a complete whole, not a series of “blocks” from a logical point of view.

    • This reply was modified 2 months, 2 weeks ago by  bhagwad.

    @bhagwad
    Thank you for expressing my thoughts better than I could!

    I recently tried out the block editor on a post where I was posting an interview. It was annoying to have the question and answer be separate blocks. I would have preferred to have each question and its answer be one block instead of separate blocks. It’s just more logical that way, even though on the frontend it wouldn’t make a difference.

    Moderator t-p

    (@t-p)

    It was annoying to have the question and answer be separate blocks. I would have preferred to have each question and its answer be one block instead of separate blocks. It’s just more logical that way

    Have you tried the Classic block which is much like the Classic editor?

    Have you tried the Classic block which is much like the Classic editor?

    I have not, but it sounds like that would work. Thanks.

    However, it makes me question the point of having a <p> block. I think you could kill two birds with one stone if you just added an option for the <p> block where pressing Enter will insert a paragraph break inside the current block rather than create a new paragraph block. Existing Classic blocks from pre-5.0 entries could be turned into Paragraph blocks with this option checked by default. That way you can kind of consolidate the Classic block and Paragraph block into one. I feel it would be a more streamlined experience this way. I mean, I didn’t know about the Classic block until you mentioned it now, and I’m sure many casual users of WordPress don’t know about it either.

    • This reply was modified 2 months, 2 weeks ago by  Mew.
    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    It was annoying to have the question and answer be separate blocks.

    Have you looked around at other blocks? This one wouldn’t make sense for an interview format, but it immediately came up when I looked for Question and Answer block:

    https://wordpress.org/plugins/faq-block-for-gutenberg/

    For most purposes, there’s probably a block for it.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    However, it makes me question the point of having a <p> block. I think you could kill two birds with one stone if you just added an option for the <p> block where pressing Enter will insert a paragraph break inside the current block rather than create a new paragraph block. Existing Classic blocks from pre-5.0 entries could be turned into Paragraph blocks with this option checked by default. That way you can kind of consolidate the Classic block and Paragraph block into one.

    Classic Blocks are special. Specifically, they are “non-blocks”. Items inside the Classic Block are not in a “block” at all, in the post content. This means that their content gets handled by the old autop code and so forth.

    The block editor is a new way of doing things at a more fundamental level. It allows the editor code itself to control all of the HTML, such as the P tags and so on. In previous versions of WordPress. The post content did not contain such P tags, and WordPress added them in post-processing, amongst other adjustments. With the new editor, that post processing step can be skipped, except for the classic block, where the old post processing must still be done.

    Hi, @otto42. Thanks for responding.

    I assume that unlike plugins, having tons of blocks installed won’t affect site performance since they’re just used to render code?

    I appreciate the explanation of Classic blocks to further my understanding. Are there any disadvantages to using Classic blocks over Paragraph blocks? While there seems to be alternatives to achieve what I’m requesting, I still think it’s easiest if there were just an option to have breaks within the same Paragraph block. The option could be off by default, but I think giving users a choice is not a bad thing. There would be no need to install new blocks or use a different block. It could all be achieved with the Paragraph block which people are most likely to turn to first.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    @gokumew2 Having tons of plugins won’t hurt a site either. It’s all about what the code you have is doing, not how much of it there is. You could have 100 really small plugins and the site will work just fine, but one big performance hogging plugin will bring the site to a crawl.

    That said, block plugins do tend to be a bit lighter, since a lot of the blocks are made in pure javascript, so other than the time to transfer that JS code to your browser, there’s very little server hits involved. Now, some plugins that did big things already have added blocks to them, but that won’t change their existing performance in any real way.

    Are there any disadvantages to using Classic blocks over Paragraph blocks?

    Yes, they’re not real blocks. The benefits of using actual blocks only becomes apparent after you use them a while. If you’re the kind of person who wants to write your own HTML, then there are a number of ways to do that. If you’re the kind of person who wants to let the editor handle that for you, then the blocks are a great way to do that. But the classic block, and the classic editor, was a somewhat difficult to use mix of both worlds. Using the classic editor means trading in the advantages of blocks for the disadvantages of having the editor do things like auto inserting P tags for you. Blocks give you more control over the content, not less. The only advantage to using the classic methods is that those still mostly work with other page builder plugins. If you use those, then the classic editor is a good choice for now, until your page builder can get updated,

    The option could be off by default, but I think giving users a choice is not a bad thing.

    You have such a choice. You can use classic blocks (built in), you can edit any block as HTML directly (also built in), or you can install the classic editor (as a plugin). What you’re saying here is that you see the choices as equal, but they’re not. The block editor is better in the long run. Choice is anathema to making the correct decision in the first place. Users don’t need a choice, they need the ability to edit their content in ways which are useful and meaningful to publishing on the web. The software should do the right thing, and in this case, the right thing is the block editor.

    There would be no need to install new blocks or use a different block. It could all be achieved with the Paragraph block which people are most likely to turn to first.

    Having a choice of blocks and having many different blocks, and a variety of them, is a good thing. Blocks separate the pieces of the page into simple and easy to understand pieces. The resulting code that they produce is much more sane, simple, adhering to standards, etc. This mish-mash of HTML that is produced by themes and people writing their own code and such leads to problems. SEO issues, accessibility issues, problems with standardization and advancement of the standards.

    Do you really want to write your own HTML? Because I can, but I sure don’t want to. It’s annoying, and not worth my time. The block editor is a first step in eliminating the need to know it in order to “do the right thing” with web publishing.

Viewing 15 replies - 1 through 15 (of 27 total)
  • You must be logged in to reply to this topic.