All of the following examples are part of the content stored in the post_content
column of the database.
A Static Block
A Paragraph Block
<!-- wp:paragraph -->
<p>This is a paragraph block.</p>
<!-- /wp:paragraph -->
A Quote Block
<!-- wp:quote -->
<blockquote class="wp-block-quote">
<p>I was only ever wrong once
and that was the time I
thought I was wrong.</p>
<cite>My Grandfather</cite></blockquote>
<!-- /wp:quote -->
A Dynamic Block
<!-- wp:my-plugin/my-block -->
<p class="wp-block-my-plugin-my-block">
Hello from the saved content!</p>
<!-- /wp:my-plugin/my-block -->
A Dynamic Block
Dynamic block – no stored attributes
The following block would either have no attributes (or the attributes are stored in post meta).
<!-- wp:my-plugin/my-block /-->
Dynamic block with attribute called “val”
<!-- wp:my-plugin/my-block {"val":"Now I have editable content. I editted this."} /-->
Leave a Reply