You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, revealjs does support only a few, and especially <embed> is not one of them - only img, video, audio and iframe are supported.
// Media elements with data-src attributesqueryAll(slide,'img[data-src], video[data-src], audio[data-src], iframe[data-src]').forEach(element=>{if(element.tagName!=='IFRAME'||this.shouldPreload(element)){element.setAttribute('src',element.getAttribute('data-src'));element.setAttribute('data-lazy-loaded','');element.removeAttribute('data-src');}});
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.
The text was updated successfully, but these errors were encountered:
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 herehttps://github.com/jgm/pandoc/blob/2e50c8d1378e911095918a42c04643d64946d554/src/Text/Pandoc/Writers/HTML.hs#L1520-L524
This is then applied for various element
pandoc/src/Text/Pandoc/Writers/HTML.hs
Lines 1537 to 1542 in 2e50c8d
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.
The text was updated successfully, but these errors were encountered: