Embedly allows providers to set the height of the embed through JavaScript. This is useful if your Embed has a fixed height or does not predictably resize with default responsive sizing.
Right now this only works for customers that use Native embeds like Medium and Embedly's cards.
Please read how Native Embeds work!
You can read about Native Embeds here
If you are a provider all you need to do is send the height via postMessage like so:
window.parent.postMessage(JSON.stringify({
src: window.location.toString(),
context: 'iframe.resize',
height: 300 // pixels
}), '*')
So as an example, for a fixed height embed you can use the following.
window.addEventListener('resize', function(){
window.parent.postMessage(JSON.stringify({
src: window.location.toString(),
context: 'iframe.resize',
height: 300 // pixels
}), '*')
})
Please make sure you stringify the object before you send it up via postMessage, if you don't the code will not work.