tweak initialization docs

This commit is contained in:
Hakim El Hattab 2020-04-07 11:40:23 +02:00
parent 9c21f9b0f0
commit 094acd6a6a

View File

@ -155,8 +155,11 @@ It's also possible to write presentations using [Markdown](#markdown).
### Initialization
If you only have a single presentation on the page we recommend initializing reveal.js using the singleton API.
```js
```html
<script src="dist/reveal.min.js"></script>
<script>
Reveal.initialize({ keyboard: true });
</script>
```
The `initialize` method returns a promise which will resolve as soon as the presentation is ready and can be interacted with via the API.