reveal.js
reveal.js copied to clipboard
Feature request: section-Attribute to load external html
Searching through the README/docs for a long time now, but there seem to be no way to import slide-content from a html-file. There is a way to import from an external MD-file though, but often there's a need to have more ways to style and layout some slides.
We could build this ourselves in javascript with some thing like imports, but it would be very convenient to be able to import (and document.write) the contents of an external html-file as we can now import external markdown-files.
Structure for importing external markdown works like this:
<section data-markdown="summary-slide.md"></section>
So for html I would expect something to work like this:
<section data-html"summary-slide.html"></section>
This should than load the html-file with a request and put the contents inside the <section>
with a document.write
.
Allright, I see now in markdown it's allowed to put html too and that it works with reveal.js also. Not sure if we can use all html we want, but I see a lot working here, lists, divs, classes and all. So that looks fine for now!
Did you try <iframe>
?
Ctrl+F in README.md
Sharing my workflow, I am using this ..
https://github.com/janschoepke/reveal_external
which is listed here ..
https://github.com/hakimel/reveal.js/wiki/Plugins,-Tools-and-Hardware
For more complex section "includes" (such as D3.js examples in "anything" demos) I use PHP require and specify each of the slides sections as PHP files. I draw these nested includes together into index.php and if I need to serve as index.html I "view source" generated by localhost PHP server. At this stage the HTML can be passed through ..
https://validator.w3.org/#validate_by_input
The reveal_external
plugin seems to be incompatible with the current version of reveal js, a native solution would be great.