Search code examples
htmlembedquartoreveal.js

Embed a webpage in Quarto html


Is there a way to embed a webpage in a Quarto reveal.js or HTML output?

So far, there is documentation for IFrames as interactive background for reveal.js, but this is not really flexible.

Reproducible example:

---
format: revealjs
---

## A title

I'd like to embed [this webpage](https://example.com/).

Solution

  • You can use a HTML block with =html to embed a webpage, and it's interactive. This works for both HTML and revealjs output.

    ---
    format: revealjs
    ---
    
    ## A title
    
    ```{=html}
    <iframe width="780" height="500" src="https://example.com/" title="Webpage example"></iframe>
    ```
    

    enter image description here