diff --git a/README.md b/README.md
index 94eacf1..548133a 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,10 @@ The Etherpad jQuery Plugin easily allows you to embed and access a pad from Ethe
`$('#examplePadBasic').pad({'padId':'test','showChat':true});`
+### Sets the pad id, some plugin parameters and puts the pad in the div
+`$('#examplePadPlugins').pad({'padId':'test','plugins':{'pageview':'true'}});`
+
+
### Gets the padContents from Example #2 and writes it to the target div "exampleGetContents"
`$('#examplePadBasic').pad({'getContents':'exampleGetContents'});`
@@ -33,6 +37,7 @@ The Etherpad jQuery Plugin easily allows you to embed and access a pad from Ethe
'height' : 100, // The height of the embedded IFrame
'border' : 0, // The width of the border (make sure to append px to a numerical value)
'borderStyle' : 'solid', // The CSS style of the border [none, dotted, dashed, solid, double, groove, ridge, inset, outset]
+'plugins' : {}, // The options related to the plugins, not to the basic Etherpad configuration
'rtl' : false // Show text from right to left
diff --git a/index.html b/index.html
index b13b80d..5dde6c2 100644
--- a/index.html
+++ b/index.html
@@ -19,10 +19,14 @@ Example #1: Sets the pad id and puts the pad in the div
Example #2: Sets the pad id, some more parameters and puts the pad in the div
- $('#examplePadIntense').pad({'padId':'test','showChat':'true'});
+ $('#examplePadIntense').pad({'padId':'test2','showChat':'true'});
- Example #3: Gets the padContents from Example #2
+ Example #3: Sets the pad id, some plugin parameters and puts the pad in the div
+ $('#examplePadPlugins').pad({'padId':'test3','plugins':{'pageview':'true'}});
+
+
+ Example #4: Gets the padContents from Example #2
$('#examplePadIntense').pad({'getContents':'exampleGetContents'});
@@ -43,6 +47,7 @@ Available options and parameters
'height' : 100, // The height of the embedded IFrame
'border' : 0, // The width of the border (make sure to append px to a numerical value)
'borderStyle' : 'solid' // The CSS style of the border [none, dotted, dashed, solid, double, groove, ridge, inset, outset]
+ 'plugins' : {}, // The options related to the plugins, not to the basic Etherpad configuration
'rtl' : false // Show right to left text
@@ -52,6 +57,9 @@ Available options and parameters
// A slightly more intense example
$('#examplePadIntense').pad({'padId':'test2','showChat':'true'}); // sets the pad id and puts the pad in the div
+
+ // An example with plugin parameters
+ $('#examplePadPlugins').pad({'padId':'test3','plugins':{'pageview':'true'}}); // sets the pad id, some plugin parameters, and puts the pad in the div
If you are confused, view the source code for examples
diff --git a/js/etherpad.js b/js/etherpad.js
index d003ab5..73d066b 100644
--- a/js/etherpad.js
+++ b/js/etherpad.js
@@ -20,6 +20,7 @@
'borderStyle' : 'solid',
'toggleTextOn' : 'Disable Rich-text',
'toggleTextOff' : 'Enable Rich-text',
+ 'plugins' : {},
'rtl' : false
};
@@ -36,6 +37,11 @@
$.extend( settings, options );
}
+ var pluginParams = '';
+ for(var option in settings.plugins) {
+ pluginParams += '&' + option + '=' + settings.plugins[option]
+ }
+
var iFrameLink = '