

# Semantic data output (default)īy default, the media embed feature outputs semantic tags for previewable and non-previewable media. It only affects the output data (see below). This option does not change how the media are displayed inside the editor - the previewable ones will still be displayed with previews. The data output format of the feature can be configured using the option. The above limitations can be overcome with the help of proxy services like Iframely or Embedly, which is explained in the configuration guide below. This output makes it possible to later use proxy services to display the content of these media on your website. Produce a semantic tag in the data output from the editor.how a tweet is presented in the demo above). Show a placeholder of the embedded media in the editor (see e.g.Therefore, to still allow embedding tweets or Instagram photos, we chose to: Most importantly, though, the media embed feature is often not able to request those services due to same-origin policy.Īlso, the media embed feature does not support asynchronous preview providers yet. Some of these media providers expose oEmbed endpoints but not all and those endpoint responses often require further processing to be embeddable.

Unfortunately, to show previews of media such as tweets, Instagram photos or Facebook posts, the editor would need to retrieve the content of these from an external service. Thanks to the ability to hardcode this URL to HTML transformation, the media embed feature is able to show previews of YouTube, Dailymotion and Vimeo videos as well as Spotify widgets without requesting any external service. The crucial part, though, is the iframe’s src which the media embed feature can predict based on the given video URL and the aspect ratio (which affects padding-bottom).

Yes, it is quite complex, but this is the cost of creating responsive content for today’s web. If, for instance, the URL to embed is, the feature is able to predict that it needs to produce the following HTML to show this YouTube video: When the media embed feature is asked to embed a specific media element via its URL it needs to make a decision how the media will be displayed in the editor.
