mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-08-08 23:57:13 +02:00
reveal.js can now be instantiated with new Reveal(<htmlelement>,<options>)
This commit is contained in:
12
js/index.js
Normal file
12
js/index.js
Normal 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 );
|
||||
}
|
Reference in New Issue
Block a user