Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed preview API #5639

Closed
wants to merge 1 commit into from
Closed

Embed preview API #5639

wants to merge 1 commit into from

Conversation

notnownikki
Copy link
Member

@notnownikki notnownikki commented Mar 15, 2018

Description

This removes all references to the oEmbed metadata, and provides
an API based on the 'embed-parse' admin ajax action that the
classic editor uses to preview embedded content.

Some class names have changed (most notably Funny or Die) because
the provider name is now taken from the title of the block.
Previously, this came from oEmbed, but that was not reliable
as some plugins override oEmbed behaviour and do not provide
any metadata, only HTML. With this change, we are able to
define all of that data in the blocks, and not have
plugins mess things up for us unexpectedly.

How Has This Been Tested?

Create embed blocks for all tests listed in components/sandbox/README.md

Also, embed a KickStarter URL, because these were the ones that oEmbed frequently
only returns metadata for.

Types of changes

Bug fix: for #5530
Breaking change: Existing embed blocks may have to be converted, because we've got rid of some attributes.

Video embeds are no longer responsive in the editor with this change, #5333 is required to reinstate that (and can be merged separately).

This removes all references to the oEmbed metadata, and provides
an API based on the 'embed-parse' admin ajax action that the
classic editor uses to preview embedded content.

Some class names have changed (most notably Funny or Die) because
the provider name is now taken from the title of the block.
Previously, this came from oEmbed, but that was not reliable
as some plugins override oEmbed behaviour and do not provide
any metadata, only HTML. With this change, we are able to
define all of that data in the blocks, and not have
plugins mess things up for us unexpectedly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant