After making the decision to become familiar with the the WordPress block editor, and learning a bit about disabling and customizing blocks, I decided I would get familiar with the block editor by using it. So, I added my code to my functions file to remove certain blocks on this site, disabled the Classic Editor plugin, and checked out a previous post to compare.
What’s the difference?
After I made the switch, all content of any post made with the Classic editor will be placed inside a classic block. You have the option of converting the post to blocks or leaving it as is.
At first, when I clicked this it did nothing. This is because I had used
<code> in my post and the editor read it as a code block (a block type I didn’t have enabled). I added the
core/code line to my block filter and it worked just fine. The editor converted all paragraphs, headings, code, and images to the appropriate block types as expected. Nice!
My first post
Since everything seemed fine, I decided to write this post in the block editor. Besides the obvious, these are a few things I’ve noticed so far:
- I didn’t have theme support enabled via the html5 filter for the site so I wasn’t styling
figcaptionin my CSS. The block editor uses the figure element so I had to add that to my CSS beside the old
.wp-captionclass WordPress generated.
- The code now has block styles/classes added. (For now, I’m dequeuing the block editor CSS.)
- If you want the “Use Theme Style” preference to work (backend style mimics the front) use the editor style feature as before with Classic. (This seems to be a big selling point for the editor, unsure how deep into customizing I’ll get but I’ll likely create a similar experience for clients.)
- I can use markdown in the editor which is pretty nice as I use iA Writer.
- The slash command to quickly insert blocks seems helpful.
- The toolbar often gets in the way when you want to read the previous block. Pressing escape (select mode), clicking outside the block, or moving it to the top (a preference) may help.
- I like the updated, cleaner look and the improved writing experience (especially full screen). Although, at the moment, the editor screen feels disconnected from the rest of the WordPress interface.
- I had the editor get stuck in “updating…” mode locally once. The auto-save saved the revision.
Obviously, these aren’t all the differences between the editors. Just a few items I wanted to make note of.
All the Blocks
I decided to disable my block filter and leave all the blocks enabled for now. If I don’t like them I’ll either only allow approved blocks or just turn them off via the Block Manager. Either way this will give me a good opportunity to test the full suite of blocks in the current editor and future updates.
A quick word of caution
I’ve heard horror stories about making the switch but it worked just fine for this site. That said, this site is a simple blog with no custom fields, shortcodes, or plugins altering the content. I would not recommend making the switch without testing. I even pulled my site down locally to test before making the swap live.
I’ll update this post if there’s anything new (to me) to report but in the meantime, I’ll continue exploring the editor and making sure I’m not missing anything before moving onto building a site using Advanced Custom Fields blocks.
If you have any tips or tricks feel free to share! I’m still learning.