diff --git a/README.md b/README.md index 658a63f..548133a 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,13 @@ The Etherpad jQuery Plugin easily allows you to embed and access a pad from Ethe
### Sets the pad id, some more parameters and puts the pad in the div -`$('#examplePadBasic').pad({'padId':'test','showChat':'true'});` +`$('#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'});` @@ -32,7 +36,9 @@ The Etherpad jQuery Plugin easily allows you to embed and access a pad from Ethe 'width' : 100, // The width of the embedded IFrame '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] +'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 # Copyright diff --git a/etherpad.jquery.json b/etherpad.jquery.json index 0e6a605..4082283 100644 --- a/etherpad.jquery.json +++ b/etherpad.jquery.json @@ -6,7 +6,7 @@ "color", "animation" ], - "version": "1.0.1", + "version": "1.0.2", "author": { "name": "John McLear", "url": "https://github.com/ether/etherpad-lite-jquery-plugin" diff --git a/index.html b/index.html index 4d0ec21..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'});
Click me to Replace me with the pad contents
@@ -43,6 +47,8 @@

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

If you are confused, view the source code for examples

diff --git a/js/etherpad.js b/js/etherpad.js index d445e1f..73d066b 100644 --- a/js/etherpad.js +++ b/js/etherpad.js @@ -8,6 +8,7 @@ 'showChat' : false, 'showLineNumbers' : false, 'userName' : 'unnamed', + 'lang' : '', 'useMonospaceFont' : false, 'noColors' : false, 'userColor' : false, @@ -18,7 +19,9 @@ 'border' : 0, 'borderStyle' : 'solid', 'toggleTextOn' : 'Disable Rich-text', - 'toggleTextOff' : 'Enable Rich-text' + 'toggleTextOff' : 'Enable Rich-text', + 'plugins' : {}, + 'rtl' : false }; var $self = this; @@ -34,22 +37,32 @@ $.extend( settings, options ); } + var pluginParams = ''; + for(var option in settings.plugins) { + pluginParams += '&' + option + '=' + settings.plugins[option] + } + var iFrameLink = '';