reveal.js can now be instantiated with new Reveal(<htmlelement>,<options>)

This commit is contained in:
Hakim El Hattab committed 2020-03-07 10:44:02 +01:00
1 parent 33a1d8d4ad
commit bf45578ba1
5 files changed
+27 -20

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
import _reveal from './reveal.js'
// The Reveal class can be instantiated to run multiple
// presentations on the same page
window.Reveal = _reveal;
// Simplified way to create a reveal.js instance on
// a page with only one presentation, makes us backwards
// compatible with reveal.js pre 4.0
window.Reveal.initialize = options => {
window.Reveal = new _reveal( document.querySelector( '.reveal' ), options );
}