From 913fbbe259b6b08691af4697561e84a43f935879 Mon Sep 17 00:00:00 2001 From: johnyma22 Date: Sun, 7 Oct 2012 12:59:44 +0100 Subject: [PATCH 01/18] Add support for userColor param --- README.md | 1 + js/etherpad.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7d36ebc..71d8c72 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ The Etherpad jQuery Plugin Example plugin easily allows you to add and access a 'userName' : 'unnamed', // The username you want to pass to the pad 'useMonospaceFont' : false, // Use monospaced fonts 'noColors' : false, // Disable background colors on author text +'userColor' : false, // The background color of this authors text in hex format IE #000 'hideQRCode' : false, // Hide QR code 'width' : 100, // The width of the embedded IFrame 'height' : 100, // The height of the embedded IFrame diff --git a/js/etherpad.js b/js/etherpad.js index 2f20c6b..90ca009 100644 --- a/js/etherpad.js +++ b/js/etherpad.js @@ -10,6 +10,7 @@ 'userName' : 'unnamed', 'useMonospaceFont' : false, 'noColors' : false, + 'userColor' : false, 'hideQRCode' : false, 'width' : 100, 'height' : 100, @@ -41,11 +42,10 @@ iFrameLink = iFrameLink + '&useMonospaceFont='+settings.useMonospaceFont; iFrameLink = iFrameLink + '&userName=' + settings.userName; iFrameLink = iFrameLink + '&noColors=' + settings.noColors; + iFrameLink = iFrameLink + '&userColor=' + settings.userColor; iFrameLink = iFrameLink + '&hideQRCode=' + settings.hideQRCode; iFrameLink = iFrameLink +'" style="border:'+settings.border; iFrameLink = iFrameLink +'; border-style:'+settings.borderStyle; -// iFrameLink = iFrameLink +'; width:'+settings.width; -// iFrameLink = iFrameLink +'; height:'+settings.height; iFrameLink = iFrameLink +';" width="'+ '100%';//settings.width; iFrameLink = iFrameLink +'" height="'+ settings.height; iFrameLink = iFrameLink +'">'; From d9e9130a27abaaee0fec39215d9d5f9d3b242292 Mon Sep 17 00:00:00 2001 From: johnyma22 Date: Sun, 7 Oct 2012 13:05:16 +0100 Subject: [PATCH 02/18] add support to always show chat --- README.md | 1 + js/etherpad.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 71d8c72..566ecb5 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ The Etherpad jQuery Plugin Example plugin easily allows you to add and access a 'noColors' : false, // Disable background colors on author text 'userColor' : false, // The background color of this authors text in hex format IE #000 'hideQRCode' : false, // Hide QR code +'alwaysShowChat' : false, // Always show the chat on the UI '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) diff --git a/js/etherpad.js b/js/etherpad.js index 90ca009..d445e1f 100644 --- a/js/etherpad.js +++ b/js/etherpad.js @@ -12,6 +12,7 @@ 'noColors' : false, 'userColor' : false, 'hideQRCode' : false, + 'alwaysShowChat' : false, 'width' : 100, 'height' : 100, 'border' : 0, @@ -44,6 +45,7 @@ iFrameLink = iFrameLink + '&noColors=' + settings.noColors; iFrameLink = iFrameLink + '&userColor=' + settings.userColor; iFrameLink = iFrameLink + '&hideQRCode=' + settings.hideQRCode; + iFrameLink = iFrameLink + '&alwaysShowChat=' + settings.alwaysShowChat; iFrameLink = iFrameLink +'" style="border:'+settings.border; iFrameLink = iFrameLink +'; border-style:'+settings.borderStyle; iFrameLink = iFrameLink +';" width="'+ '100%';//settings.width; From de802fa27630a0776f1ec5292ecfe531901889cf Mon Sep 17 00:00:00 2001 From: johnyma22 Date: Sun, 7 Oct 2012 13:07:38 +0100 Subject: [PATCH 03/18] remember to update example docs --- index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.html b/index.html index 20ed3d0..b6f95f0 100644 --- a/index.html +++ b/index.html @@ -36,7 +36,9 @@

Available options and parameters

'userName' : 'unnamed', // The username you want to pass to the pad 'useMonospaceFont' : false, // Use monospaced fonts 'noColors' : false, // Disable background colors on author text + 'userColor' : false, // The background color of this authors text in hex format IE #000 'hideQRCode' : false, // Hide QR code + 'alwaysShowChat' : false, // Always show the chat on the UI '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) From 294a75f4c3ce4097881e4e001d4a8dee473aa505 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 7 Oct 2012 14:08:55 +0200 Subject: [PATCH 04/18] Try to discourage people using Google CDN Because jQuery CDN is better. --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 20ed3d0..8c99cc5 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ Etherpad jQuery Plugin Example - + From b493d1d8bd5158c1a0796a0dba5fe44c0be95371 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sun, 7 Oct 2012 14:13:26 +0200 Subject: [PATCH 05/18] Clean up Readme to be less 1942 --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 566ecb5..658a63f 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,20 @@ # Description -The Etherpad jQuery Plugin Example plugin easily allows you to add and access a pad from Etherpad in a web page. The plugin injects the pad contents into a div using iframes. It can also read the contents of a Pad and write it to a div. +The Etherpad jQuery Plugin easily allows you to embed and access a pad from Etherpad in a web page. The plugin injects the pad contents into a div using iframes. It can also read the contents of a Pad and write it to a div. - -# Usage +# Usage & Examples

Include jQuery.js, include etherpad.js, assign a pad to a div. If you get confused look at the examples in index.html

-

Example #1: Sets the pad id and puts the pad in the div

-
$('#examplePadBasic').pad({'padId':'test'});
+### Sets the pad id and puts the pad in the div +`$('#examplePadBasic').pad({'padId':'test'});`
-

Example #2: Sets the pad id, some more parameters and puts the pad in the div

-
$('#examplePadBasic').pad({'padId':'test','showChat':'true'});
+### Sets the pad id, some more parameters and puts the pad in the div +`$('#examplePadBasic').pad({'padId':'test','showChat':'true'});`
-

Example #3: Gets the padContents from Example #2 and writes it to the target div "exampleGetContents"

-
$('#examplePadBasic').pad({'getContents':'exampleGetContents'});
+### Gets the padContents from Example #2 and writes it to the target div "exampleGetContents" +`$('#examplePadBasic').pad({'getContents':'exampleGetContents'});` # Available options and parameters
@@ -38,5 +37,6 @@ The Etherpad jQuery Plugin Example plugin easily allows you to add and access a
 
 # Copyright
 jQuery Etherpad plugin written by John McLear (c) Primary Technology 2011
+Development funded by the Etherpad Foundation. Feel free to re-use, distribute, butcher, edit and whatever else you want. It's under the Apache licence. From 778af4457a10927c680d5041c1198e1cc1e43a9d Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 17 Jan 2013 18:25:12 +0000 Subject: [PATCH 06/18] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 567d7ba..90f47b6 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "Etherpad Lite", "description": "jQuery Etherpad Lite collaborative editor plugin.", - "version": "1.0.0", + "version": "1.0.1", "author": "John McLear ", "dependencies": { "jquery": ">= 1.0" From ea55cfb576f64cf317466869c29d64026196b701 Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 17 Jan 2013 18:43:40 +0000 Subject: [PATCH 07/18] Update package.json --- package.json | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 90f47b6..3485cc1 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,24 @@ { - "name": "Etherpad Lite", - "description": "jQuery Etherpad Lite collaborative editor plugin.", + "name": "etherpad", + "title": "jQuery Etherpad", + "description": "jQuery plugin for embedding Etherpad", + "keywords": [ + "color", + "animation" + ], "version": "1.0.1", - "author": "John McLear ", + "author": { + "name": "John McLear", + "url": "https://github.com/ether/etherpad-lite-jquery-plugin" + }, + "licenses": [ + { + "type": "Apache 2" + } + ], + "bugs": "https://github.com/ether/etherpad-lite-jquery-plugin/issues/", + "homepage": "https://etherpad.org", "dependencies": { - "jquery": ">= 1.0" + "jquery": ">=1.5" } } From 42e05a33cbe3ca47fe6a41829b25d1a3d849dfe1 Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 17 Jan 2013 18:44:31 +0000 Subject: [PATCH 08/18] manifest --- package.json => etherpad.jquery.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename package.json => etherpad.jquery.json (100%) diff --git a/package.json b/etherpad.jquery.json similarity index 100% rename from package.json rename to etherpad.jquery.json From 4162394a79e7b97e9093b8c0031ab0b361661598 Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 17 Jan 2013 18:45:32 +0000 Subject: [PATCH 09/18] Update etherpad.jquery.json --- etherpad.jquery.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etherpad.jquery.json b/etherpad.jquery.json index 3485cc1..aa6f96d 100644 --- a/etherpad.jquery.json +++ b/etherpad.jquery.json @@ -17,7 +17,7 @@ } ], "bugs": "https://github.com/ether/etherpad-lite-jquery-plugin/issues/", - "homepage": "https://etherpad.org", + "homepage": "http://etherpad.org", "dependencies": { "jquery": ">=1.5" } From b75d89a3696aecfdb530d1b3fe31abd409014d7f Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 21 Jan 2013 17:07:38 +0000 Subject: [PATCH 10/18] Update etherpad.jquery.json --- etherpad.jquery.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etherpad.jquery.json b/etherpad.jquery.json index aa6f96d..78eb7a8 100644 --- a/etherpad.jquery.json +++ b/etherpad.jquery.json @@ -13,7 +13,8 @@ }, "licenses": [ { - "type": "Apache 2" + "type": "Apache 2", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } ], "bugs": "https://github.com/ether/etherpad-lite-jquery-plugin/issues/", From c3493e47a79a6a06e7a14e690c1f754a0a43f23b Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 21 Jan 2013 17:08:38 +0000 Subject: [PATCH 11/18] Update etherpad.jquery.json --- etherpad.jquery.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etherpad.jquery.json b/etherpad.jquery.json index 78eb7a8..0e6a605 100644 --- a/etherpad.jquery.json +++ b/etherpad.jquery.json @@ -18,7 +18,7 @@ } ], "bugs": "https://github.com/ether/etherpad-lite-jquery-plugin/issues/", - "homepage": "http://etherpad.org", + "homepage": "https://github.com/ether/etherpad-lite-jquery-plugin", "dependencies": { "jquery": ">=1.5" } From c1ba9ea804f1a6074dcc69d888e00681947fd13f Mon Sep 17 00:00:00 2001 From: John McLear Date: Sat, 1 Nov 2014 01:06:27 +0000 Subject: [PATCH 12/18] add rtl support --- README.md | 3 ++- etherpad.jquery.json | 2 +- index.html | 1 + js/etherpad.js | 24 +++++++++++++----------- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 658a63f..33b3b39 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,8 @@ 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] +'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..b13b80d 100644 --- a/index.html +++ b/index.html @@ -43,6 +43,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] + '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 c1862e9..73d066b 100644 --- a/js/etherpad.js +++ b/js/etherpad.js @@ -14,13 +14,13 @@ 'userColor' : false, 'hideQRCode' : false, 'alwaysShowChat' : false, - 'pageview' : false, 'width' : 100, 'height' : 100, 'border' : 0, 'borderStyle' : 'solid', 'toggleTextOn' : 'Disable Rich-text', 'toggleTextOff' : 'Enable Rich-text', + 'plugins' : {}, 'rtl' : false }; @@ -37,6 +37,11 @@ $.extend( settings, options ); } + var pluginParams = ''; + for(var option in settings.plugins) { + pluginParams += '&' + option + '=' + settings.plugins[option] + } + var iFrameLink = '