mirror of
https://github.com/Noratrieb/slides.git
synced 2026-01-16 09:25:06 +01:00
reveal.js can now be instantiated with new Reveal(<htmlelement>,<options>)
This commit is contained in:
parent
33a1d8d4ad
commit
bf45578ba1
5 changed files with 27 additions and 20 deletions
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 );
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue