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

TinyMCE per block: Adding a simple embed block #181

Merged
merged 1 commit into from
Mar 6, 2017

Conversation

youknowriad
Copy link
Contributor

In this PR, I'm adding a simple Embed Block. For now, it's only capable of showing youtube videos.

@youknowriad youknowriad added the [Type] Enhancement A suggestion for improvement. label Mar 6, 2017
@youknowriad youknowriad self-assigned this Mar 6, 2017
'<!-- wp:embed -->',
'https://www.youtube.com/watch?v=Nl6U7UotA-M',
'<!-- wp:embed url:https://www.youtube.com/watch?v=Nl6U7UotA-M -->',
'<iframe width="560" height="315" src="//www.youtube.com/embed/Nl6U7UotA-M" frameborder="0" allowfullscreen></iframe>',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aduth I updated the markup because in static blocks, the markup should be the same as the output markup

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aduth I updated the markup because in static blocks, the markup should be the same as the output markup

Hmm, this could have an interesting impact on oEmbeds in core though. Currently a post will store a link like this in its plain form (just the URL, not the frame) and fetch+cache the resulting embed at the time of content being rendered. This can be desirable in some cases to allow the embed provider to change their markup if need be and have it be reflected after a site's embed cache expires.

Copy link
Contributor Author

@youknowriad youknowriad Mar 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well! I assume this is the behavior of "dynamic" blocks, so I'm not agains considering the embed as a dynamic block. Which will be our first example of dynamic blocks

@youknowriad youknowriad merged commit a6296f8 into master Mar 6, 2017
@youknowriad youknowriad deleted the add/per-block/embed-block branch March 6, 2017 10:28
hypest pushed a commit that referenced this pull request Nov 2, 2018
…ts-when-splitting-blocks

Simplifies onEnter handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants