Open cderv opened 2 years ago
What do you think we should do instead?
Using src
attributes as in html output works in revealjs.
I believe the data-src
attributes for Lazy Loading should be used only for the elements that are supported in revealjs.
We could also ask upstream to support this, but currently I believe this is a bug as you can't insert such document using image syntax for revealjs format because Pandoc will write something not supported by revealjs.
But asking upstream is definitely a solution. Lazy Loading could also work with <embed>
I believe. I'll open an issue there.
This is what we got if we tries to embed a PDF file in HTML file and HTML presentation
There is a special treatment to use
data-src
for Lazy Loading feature in revealjs instead ofsrc
. I believe this is here https://github.com/jgm/pandoc/blob/2e50c8d1378e911095918a42c04643d64946d554/src/Text/Pandoc/Writers/HTML.hs#L1520-L524 This is then applied for various element https://github.com/jgm/pandoc/blob/2e50c8d1378e911095918a42c04643d64946d554/src/Text/Pandoc/Writers/HTML.hs#L1537-L1542 However, revealjs does support only a few, and especially<embed>
is not one of them - onlyimg
,video
,audio
andiframe
are supported.Source: https://github.com/hakimel/reveal.js/blob/f7c59649fe9d72a148860220a66511cefd142907/js/controllers/slidecontent.js#L52-L59 Doc: https://revealjs.com/media/#lazy-loading
We could also ask upstream to support this, but currently I believe this is a bug as you can't insert such document using image syntax for revealjs format because Pandoc will write something not supported by revealjs.