From f512214e81b0561fb108f03e7438a1717847e29a Mon Sep 17 00:00:00 2001 From: Antonio Laguna Date: Wed, 19 Apr 2017 17:49:14 +0200 Subject: [PATCH] Updated Plugin development (markdown) --- Plugin-development.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Plugin-development.md b/Plugin-development.md index 0d38529..dce7ba7 100644 --- a/Plugin-development.md +++ b/Plugin-development.md @@ -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. \ No newline at end of file +- `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. \ No newline at end of file