This repository has been archived by the owner. It is now read-only.
Realtime text collaboration with Node.js, Express.js and Now.js
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


These days there is now ShareJS. You should probably use that instead.

Nowpad is no longer maintained and the now dependency that nowpad depends on no longer works. Theoritically, the now dependency could be swapped out for primus, which should take about half a day, but that is not guaranteed to work.

NowPad: Realtime Text Collaboration

Build Status NPM version Dependency Status Development Dependency Status
Gittip donate button Flattr donate button PayPayl donate button BitCoin donate button Wishlist browse button

NowPad adds realtime text collaboration to parts of your website such as textareas, allowing multiple people to work on the same document at the same time (while seeing each others changes as they are applied). The benefit of this over traditional collaborative editing is two people would be editing the same document, they've both made changes, one person saves, and the other has to make the choice 'lose my changes, or lose his changes'. Nowpad keeps and applies both your changes as they happen.



  • Use: require('nowpad')
  • Install: npm install --save nowpad

It Uses

  • Node.js - Server Side Javascript
  • Express.js - The "Server" in Server Side Javascript
  • Now.js - Server and Client Side Communication
  • CoffeeScript - JavaScript Made Easy
  • Buildr - (Java|Coffee)Script Bundling Made Easy


  1. Clone and setup this repo

     git clone nowpad
     cd nowpad
     npm install
     npm link
  2. Start the demo app

     nowpad  # or npm start if inside nowpad directory


Server Side

// Include NowPad
var nowpad = require('nowpad')

// Setup with your Express Server
var myNowpad = nowpad.createInstance({server: yourExpressServer})

	//Create known documents
myNowpad.addDocument('doc1', 'this is doc1')
myNowpad.addDocument('doc2', 'this is doc2')

// Handle unknown document
// Fires when an unknown document is requested
myNowpad.requestDocument(function(documentId, callback){
	// nowpad.addDocument(documentId)
	// callback(true)
	callback false

// Handle sync request
// Fires when a change is synced to the document
myNowpad.bind('sync', function(document, value){


// Handle disconnect request
// Fires when all the clients have disconnected from a document
myNowpad.bind('disconnected', function(document, value){


Client Side

  1. Include Dependencies

    <script src="/nowjs/now.js"></script>
    <script src="/nowpad/nowpad.js"></script>
  2. Using NowPad with a Textarea

    // Without jQuery
    	element: document.getElementById('myTextarea'),
    	documentId: 'doc1'
    // Or With jQuery
    $textarea = $('#myTextarea').nowpad('doc1');
  3. Using NowPad with ACE

    	element: ace.edit('pad'),
    	documentId: 'doc1'



Discover the change history by heading on over to the file.


Discover how you can contribute by heading on over to the file.



These amazing people are maintaining this project:


No sponsors yet! Will you be the first?

Gittip donate button Flattr donate button PayPayl donate button BitCoin donate button Wishlist browse button


These amazing people have contributed code to this project:

Become a contributor!


Licensed under

Copyright © 2011+ Benjamin Lupton (