Added support for no-iframed embeds

refs https://github.com/TryGhost/Team/issues/1211

This is to allow us to style the NFT embed card in the Admin
This commit is contained in:
Fabien O'Carroll 2021-11-11 13:46:26 +02:00
parent d3cfa14498
commit 8e29e8de79
2 changed files with 7 additions and 1 deletions

View File

@ -19,7 +19,11 @@
{{#if this.payload.html}} {{#if this.payload.html}}
<div class="kg-card-hover"> <div class="kg-card-hover">
<div class="koenig-embed-{{this.payload.type}} flex justify-center relative" data-kg-embed> <div class="koenig-embed-{{this.payload.type}} flex justify-center relative" data-kg-embed>
<iframe class="bn miw-100" scrolling="no"></iframe> {{#if this.payload.noIframe}}
{{{this.payload.html}}}
{{else}}
<iframe class="bn miw-100" scrolling="no"></iframe>
{{/if}}
<div class="koenig-card-click-overlay ba b--transparent" data-kg-overlay></div> <div class="koenig-card-click-overlay ba b--transparent" data-kg-overlay></div>
</div> </div>

View File

@ -188,6 +188,8 @@ export default Component.extend({
delete response.html; delete response.html;
set(this.payload, 'type', response.type); set(this.payload, 'type', response.type);
delete response.type; delete response.type;
set(this.payload, 'noIframe', !!response.noIframe);
delete response.noIframe;
// store all other data returned from oembed such as thumbnails, sizing, etc // store all other data returned from oembed such as thumbnails, sizing, etc
set(this.payload, 'metadata', response); set(this.payload, 'metadata', response);