Enable Support for Block Editor (Gutenberg)

With version 1.3.2 of Toolbar Extras came the first few features that support the upcoming Block Editor which will come by default with WordPress Version 5.0. This new Block Editor is currently known as “Gutenberg” and available as a plugin. Technically it is a working “alpha version” and you can try it out already. I do not recommend this, though, as the “product” is far from ready yet.

Why does Toolbar Extras support it even then?

Good question, the support is essential and needed as this new Block Editor will be the default WordPress experience in a short time from now. So it is really important to play well with it.

While “Gutenberg” is denied by its developers and marketers as being a “Page Builder” in my opinion it is just that. Users will have a building experience when using it. No matter if this experience is currently good or bad, it just feels more than ever you are building something, visually. Compared to this the current Editor in WordPress (up to v4.9.x) has “only” been a real writing and/or “coding” experience. But when considered being a “Page Builder” it has the consequence of deciding which is the “default” Builder – regarding the Toolbar support. For that reason there will be an upcoming setting in the plugin to set a default Builder, being that Elementor (recommended), “Gutenberg” or any other upcoming supported Builder. This will help you to have clean and still useful experience within your Toolbar.

How to enable support in Toolbar Extras?

At this time support is enabled via a constant in your wp-config.php file or alternatively in a snippets plugin like Code Snippets. Just add this line:
define( 'TBEX_USE_BLOGK_EDITOR_SUPPORT', TRUE );

Note, in an upcoming major version of Toolbar Extras – most likely v1.4.0 – this whole Block Editor/ Gutenberg support thing will be integrated into the plugin’s settings. And, there will also be more useful fearures added to the Toolbar then.

What happens when enabling support?

An editor switcher will be added to the Toolbar when editing any singular item of a post, page or post type (that has post type support for “editor”). Note, “Gutenberg” the plugin needs to be installed and active, too, otherwise the whole support is not loaded/enabled.

Then, when in Editing or Viewing mode of a post you can switch the Editor type from the Toolbar:
• Classic Post (non Gutenberg) –> switch forth to Editing with Block Editor (Gutenberg)
• Gutenberg Post (Block Editor) –> switch back to Classic Editor

IMPORTANT NOTE: Existing Gutenberg blocks cannot be edited with the Classic Editor again – even in HTML mode. The slightest change, including fixing spelling, will “break” the block, and cause error messages when back in Gutenberg. This may seem like a bad thing, but it is not. It is essential to keep block content from being corrupted. — So, it is an ultimate user decision what to use, please keep that in mind. Because of all of the above, this “switcher” thing will never be enabled by default, also not with the upcoming plugin’s settings integration. I want to give users tools to help them but in a responsible kind of way.