Gutenberg block as HTML output

[ad_1]

Is there a way to design a Gutenberg block and copy its full source (HTML+CSS+JS)? I am thinking maybe if I use an absolute barebones theme, perhaps I can publish a page with the block and copy the HTML from page source? Is there any such theme with no extra code whatsoever?

EDIT: by “design a Gutenberg block”, I meant create it in the block editor, not actually design the block.

[ad_2]
2 Comments
  1. Yes you could do that. There is a HTML block in the editor. The classname for the HTML you’ve copied would need to all be present in your theme, which can become difficult and the JS would need to be added via the theme or a snippets plugin.

    It’s a really ugly way to do it, as you won’t see the HTML render in the backend, it will just be code. Maybe fine for you, but for any other user it would be hard to read.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer