Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A jQuery plugin to inject Etherpad lite pads and read the content from pads

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 js
Octocat-spinner-32 README.md
Octocat-spinner-32 index.html
Octocat-spinner-32 package.json
README.md

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.

Usage

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'});

Example #2: 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'});

Available options and parameters

'host'     : 'http://beta.etherpad.org', // the host and port of the Etherpad instance, by default the foundation will host your pads for you
'baseUrl'  : '/p/', // The base URL of the pads
'showControls'     : false, // If you want to show controls IE bold, italic etc.
'showChat' : false, // If you want to show the chat button or not
'showLineNumbers'  : false, // If you want to show the line numbers or not
'userName' : 'unnamed', // The username you want to pass to the pad.
'useMonospaceFont' : false // Use monospaced fonts
'noColors' : false // Disable background colors on author text

Copyright

jQuery Etherpad plugin written by John McLear (c) Primary Technology 2011
Feel free to re-use, distribute, butcher, edit and whatever else you want. It's under the Apache licence.

Something went wrong with that request. Please try again.