Simple workaround to embed third party content inside articles, keeping everything neat and tidy! or in other words, responsive fluid.
It works as a proxy, creating a layer that will resize the content if needed to fit everything inside the available width. All modern browsers are supported and Internet Explorer 9+.
Publish all the files within the dist
project's folder, then add the following code wherever you want to embed something:
<iframe frameborder="0" scrolling="no" src="path/to/tpce-v0.0.4.html?content=http%3A//example.com/&width=800&height=600"></iframe>
Make sure this iframe
has proper styles to be fluid, otherwise the magic won't happen. Keep the frameborder
and scrolling
attributes, they solve some rendering issues.
The tpce-v0.0.4.html
has the following query string parameters:
content
url that is intented to be embeded.width
the original width of the content.height
the original height of the content, make sure to also set the same height in theiframe
.debug
set to true to see useful messages in the console.