Embed

Add a block that displays content pulled from other sites, like Twitter or YouTube.

This block is available in the latest version of WordPress and does not require the Gutenberg plugin.

Category:

Block variations: Twitter, YouTube, Facebook, Instagram, WordPress, SoundCloud, Spotify, Flickr, Vimeo, Animoto, Cloudup, CollegeHumor, Crowdsignal, Dailymotion, Imgur, Issuu, Kickstarter, Mixcloud, Pocket Casts, Reddit, ReverbNation, Screencast, Scribd, Slideshare, SmugMug, Speaker Deck, TikTok, TED, Tumblr, VideoPress, WordPress.tv, Amazon Kindle, Pinterest, Wolfram,


For developers

Block Grammar & Markup

<!-- wp:embed {"url":"https://example.com/"} -->
<figure class="wp-block-embed">
    <div class="wp-block-embed__wrapper">
        https://example.com/
    </div>
    <figcaption class="wp-element-caption">Embedded content from an example URL</figcaption>
</figure>
<!-- /wp:embed -->

Block Attributes

Optional. Type: Object.

Attributes provide the structured data needs of a block. They can exist in different forms when they are serialized, but they are declared together under a common interface.

Documentation

{
  "url": {
    "type": "string",
    "__experimentalRole": "content"
  },
  "caption": {
    "type": "string",
    "source": "html",
    "selector": "figcaption",
    "__experimentalRole": "content"
  },
  "type": {
    "type": "string",
    "__experimentalRole": "content"
  },
  "providerNameSlug": {
    "type": "string",
    "__experimentalRole": "content"
  },
  "allowResponsive": {
    "type": "boolean",
    "default": true
  },
  "responsive": {
    "type": "boolean",
    "default": false,
    "__experimentalRole": "content"
  },
  "previewable": {
    "type": "boolean",
    "default": true,
    "__experimentalRole": "content"
  }
}

Block Supports

Optional. Type: Object.

A set of options that enables or disables block controls in the editor, for example gradient colors or padding.

Documentation

{
  "align": true
}

Transforms

Optional. Type: Object.

Transforms provide rules for what a block can be transformed from and what it can be transformed to.

Documentation

Transforms from:

Transforms to: Paragraph.