• Resolved dtweney

    (@dtweney)


    Hi there. I publish a poetry magazine called tinywords (online since 2000, and running on WordPress since 2009), and a frequent requirement is to insert extra blank lines within posts.

    This has always been a little tricky, as the previous WordPress text editor had a tendency to remove them — but with Gutenberg this got quite difficult. It seems the editor (or something) really has an aversion to them!

    The solution suggested here doesn’t actually work — pressing Shift-Enter (or Shift-Return) does insert a blank line temporarily, but the editor or the display engine removes it, so it doesn’t show up in the published post.

    I have gotten this to work by pressing Shift-Enter and then entering a single space on each blank line, but this is a little awkward. (In code view, these lines appear as <br /> line breaks.)

    Is there a more intuitive way to insert blank lines into copy in Gutenberg?

    One key requirement is that I’d like a solution that works for the other, non-technical editors of the site.

    Thank you!

    • This topic was modified 5 years, 8 months ago by dtweney.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi there, yes the “Shift + Enter” only works within the same paragraph but not at the end of a paragraph… Totally annoying<g>

    Most of the time the need for an empty line is more a need of a little more white space around some of the content. Adding an additional line was actually always a ‘hack’ as a solution, used since the time of the mechanical typewriter.

    You might want to experiment with the “Spacer” block available in the editor, settle on a good size of the space and then reuse it. Once you save it as a ‘reusable’ block you can always add it to your text via the keyboard using the Slash command “/” + partial block name.

    That should also be a solution that is suitable for your non-technical editors.

    Thread Starter dtweney

    (@dtweney)

    @bph Thanks for your reply. The “spacer” block is new to me — I was able to find it, and it does the trick.

    Thanks also for the suggestion about making it a reusable block and using the / to call it up. These are all new features that I did not know about yet. Thank you!

    I don’t think of blank lines as a “hack” — leading is a basic feature in typesetting and it is often desirable to add extra leading, for instance between different sections of a prose document, between different poems in a collection of poems, etc. Hitting return is a natural way to do this, and the amount of space can easily be controlled in an intuitive way (return twice = two blank lines, etc.). So I am inclined to think that WordPress’s lack of an easy way to add leading is a design flaw that overlooks a common typesetting need actually!

    • This reply was modified 5 years, 7 months ago by dtweney.

    Glad that the spacer block is a working alternative for you.

    The spacer has a small blue dot in the middle of the bottom edge you can use to drag to make the optimal space for you. The block specific settings tab allows you to set the height of the spacer.
    Here is the documentation for the Spacer Block

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    An alternative that may be more suitable for you is a built in default block called the “Verse” block.

    The Verse block allows for multiple blank lines inside text. A normal paragraph is wrapped in P tags. The verse block is wrapped in a PRE tag, and each blank line creates a single BR tag for a line break.

    To use it, select the Verse block, then type your text. Enter will switch to a new line without leaving the block. Multiple blank lines in a row will be multiple BR line breaks in the HTML. When you do want to leave the block and create a new normal paragraph, hit the down arrow to move to the next block area below the verse block.

    Since you publish poetry, the verse block may be especially suitable if you normally post these poems using a different styling. That PRE tag wrapper has a class on it like so: <pre class="wp-block-verse"> and you can use that to style these blocks however you like.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to create a blank line in Gutenberg editor?’ is closed to new replies.