We had a request for iFrame support in courses. The use case was simple, and generic: to be able to use Leanpub to create a course with quizzes and exercises, without having to rewrite all the material in Markua.

So, we shipped an MVP version of this. Screenshots are below, as well as the code that produced.

(Note that we need to prevent the Leanpub website from being rendered in an IFrame. Once we do, the first example will not work.)

The really cool thing, by the way, is that a PDF of slides does work (per the second example). So, if you can produce a PDF of slides, you’re good to go!

There is one huge gotcha: the content must be at an https URL. An http URL will NOT work.

Anyway, here’s the example code; see the attached screenshots to see how it behaves:

# iFrame Examples

## An HTML iFrame

Here's a paragraph before the figure.

{type: iframe, title: "The Leanpub Website", poster: LeanpubHomepage.png, width: 300, height: 200}
![]([https://leanpub.com](https://leanpub.com/))

Here's a paragraph after the figure.

## A PDF iFrame Here's a paragraph before the figure.

{type: iframe, title: "Introducing Markua", poster: Markua.png, width: 300, height: 200}
![](https://s3.us-west-1.amazonaws.com/markua.com/Markua.pdf)

Here's a paragraph after the figure.

code
course%20display
html%20iframe

The full spec for the feature is here:

http://markua.com/#iframe-resources-m-

However, the “title in quotes after URL” syntax does not work in Markua 0.10, and courses currently do not support Markua 0.30 yet. So, only the approach above works.

Here is the thread in the Authors Forum about this topic:

https://community.leanpub.com/t/courses-now-support-iframes/3836

Did this answer your question?