Defaulting to the Gutenberg Classic Editor – Fixing Gutenbergs Paragraphs

I have noticed one of the most frequent complaints about Gutenberg is the fact that paragraphs are treated as individual blocks. This disrupts the writing flow and makes normal text operations more cumbersome.

*

I was thinking about this the other day and remembered that it’s possible to change the default blocks on a per post type basis. So it’s relatively straightforward to set the classic editor block as the default block for blog posts; instead of paragraph blocks (as they are now). This means that when you write a post pressing enter will create a new line (or line break) rather than a new paragraph.

The code is super simple too – I have added it below. You can view the original Gist on Github. You can also download a zip of the Gist and install it as a plugin.

I appreciate that this isn’t a perfect solution – but for some it may help ease the transition into a block based interface.

Personally I have moved over to using Gutenberg full time and, whilst Gutenberg still has a few quirks, am pretty happy with the new setup and the extra flexibility it offers.

How was it for you? Let me know on BlueSky or Mastodon

(Please) Link to this page

Thanks for reading. I'd really appreciate it if you'd link to this page if you mention it in your newsletter or on your blog.

Related Posts

26 Sep 2018

WordPress get_post_gallery() Gutenberg Polyfill

I’m working on a new WordPress theme designed for Gutenberg, however Gutenberg isn’t finished, and there are elements that won’t work until the plugin is merged with core.One such issue, that I ran into this weekend, is that get_post_gallery() doesn’t...
27 Oct 2013

WordPress Numeric Pagination

I’ve made quite a few WordPress themes in my time, and so I thought I would write a few blog posts sharing some of the code snippets that I find myself using repeatedly.First off is some numeric pagination using native...
31 Oct 2013

WordPress – Estimated Reading Time

I have a theme coming out soon that displays the ‘estimated reading time’ for each blog post on the homepage.The theme is inspired by the new blogging service Medium – but I first saw the idea mentioned on Brian Crays...
16 Mar 2019

The WordPress Block Directory

There has recently been a proposal to introduce a new type of plugin into WordPress. One specifically for editor blocks.I find this an interesting concept, and I can definitely see some benefits, but there are also some downsides. For starters;...
06 Apr 2017

Fixing Typographic Widows in WordPress

Typography on websites is hard – especially if that site is powered by a CMS such as WordPress. Making the text on a site look good when the screen size, or content, can be changed means that often you have...
14 May 2013

Redesigning the WordPress Post Editor

Ghost is a project born from frustration with WordPress. Ironically it seems to be mostly WordPress power users who want to use it. The Ghost team – led by John O’Nolan – put Ghost on KickStarter last week and it...