-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Conversation
3ef7c93
to
639b034
Compare
'<!-- 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>', |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
…ts-when-splitting-blocks Simplifies onEnter handling.
In this PR, I'm adding a simple Embed Block. For now, it's only capable of showing youtube videos.