2020-03-07 17:22:19 +00:00
|
|
|
import Presentation from './reveal.js'
|
2020-03-07 09:44:02 +00:00
|
|
|
|
|
|
|
// The Reveal class can be instantiated to run multiple
|
|
|
|
// presentations on the same page
|
2020-03-07 17:22:19 +00:00
|
|
|
//
|
|
|
|
// let rvl = new Reveal( <HTMLElement>, { controls: false } )
|
|
|
|
// rvl.initialize()
|
|
|
|
// rvl.slide(2)
|
|
|
|
window.Reveal = Presentation;
|
2020-03-07 09:44:02 +00:00
|
|
|
|
|
|
|
// 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
|
2020-03-07 17:22:19 +00:00
|
|
|
//
|
|
|
|
// Reveal.initialize({ controls: false })
|
|
|
|
// Revea.slide(2)
|
2020-03-07 09:44:02 +00:00
|
|
|
window.Reveal.initialize = options => {
|
2020-03-07 17:22:19 +00:00
|
|
|
window.Reveal = new Presentation( document.querySelector( '.reveal' ), options );
|
|
|
|
window.Reveal.initialize();
|
|
|
|
return new Promise( resolve => window.Reveal.addEventListener( 'ready', resolve ) );
|
2020-03-07 09:44:02 +00:00
|
|
|
}
|