Skip to content

Instantly share code, notes, and snippets.

@dmsnell
Created December 7, 2022 00:10
Show Gist options
  • Save dmsnell/b1182009c997baf8dabc759ac5e8124e to your computer and use it in GitHub Desktop.
Save dmsnell/b1182009c997baf8dabc759ac5e8124e to your computer and use it in GitHub Desktop.
Gutenberg serialized HTML post with no sourced attributes.
<!-- wp:paragraph {"content":"This paragraph has \u003cem\u003e\u003cstrong\u003eno sourced attributes\u003c/strong\u003e\u003c/em\u003e. It's content is fully stored inside the JSON attributes \u003cem\u003eand\u003c/em\u003e it still contains the rendered HTML useful for rendering it with no server is available."} -->
<p>This paragraph has <em><strong>no sourced attributes</strong></em>. It's content is fully stored inside the JSON attributes <em>and</em> it still contains the rendered HTML useful for rendering it with no server is available.</p>
<!-- /wp:paragraph -->
<!-- wp:image {"url":"https://wordpress.org/files/2022/08/theme-styles.png","caption":"Image captions are usually sourced from the \u003ccode\u003efigcaption\u003c/code\u003e element.","width":650,"height":406,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large is-resized"><img src="https://wordpress.org/files/2022/08/theme-styles.png" alt="" width="650" height="406"/><figcaption class="wp-element-caption">Image captions are usually sourced from the <code>figcaption</code> element.</figcaption></figure>
<!-- /wp:image -->
<!-- wp:heading {"content":"Even headings usually source their level as the \u003ccode\u003eh1/2/3/4/5/6\u003c/code\u003e tag.","level":3} -->
<h3 class="wp-block-heading">Even headings usually source their level as the <code>h1/2/3/4/5/6</code> tag.</h3>
<!-- /wp:heading -->
<!-- wp:paragraph {"content":"But the default value is \u003ccode\u003e2\u003c/code\u003e, so the default value won't be present."} -->
<p>But the default value is <code>2</code>, so the default value won't be present.</p>
<!-- /wp:paragraph -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment