mirror of
https://github.com/webslides/WebSlides.git
synced 2025-08-31 00:39:48 +02:00
Updated Plugin development (markdown)
@@ -23,4 +23,22 @@ Here's the list with links to any plugins that have any relevant information:
|
||||
- `scroll` - Allows to navigate with scroll.
|
||||
- `touch` - Allows to navigate with touch gestures.
|
||||
- `video` - Allows to pause video and autoplay them upon entering the slide.
|
||||
- `youtube` - Allows to control YouTube videos.
|
||||
- `youtube` - Allows to control YouTube videos.
|
||||
|
||||
## Getting started
|
||||
|
||||
When creating a new plugin you can use Classes. Something like this:
|
||||
|
||||
```javascript
|
||||
class MyPlugin {
|
||||
constructor(wsInstance) {
|
||||
// Do your magic 🌟
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The constructor gets the WebSlides instance which allows you to call any of the [public methods](Core-API).
|
||||
|
||||
### Plugins that affect only some slides
|
||||
|
||||
There are times in which you may need to add a feature to only certain slides like we do with videos for example.
|
Reference in New Issue
Block a user