JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12
  • Score
    100M100P100Q89785F

Realtime Text Collaboration

Package Exports

  • nowpad

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nowpad) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

NowPad: Realtime Text Collaboration

Uses

  • Node.js - Server Side Javascript
  • Express.js - The "Server" in Server Side Javascript
  • Now.js - Server and Client Side Communication

Install

npm install nowpad

Demo

  • Basic single textarea demo

      nowpad basic # http://localhost:9572/
  • ACE Code Editor demo

      nowpad ace # http://localhost:9572/

Usage

  • Server Side

      // Include
      nowpad = require("nowpad");
    
      // Setup with your Express Server
      nowpad.setup(app);
    
      // Bind to Document Changes
      nowpad.bind('sync',function(value){});
  • Client Side

    • Include Dependencies

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

        // Without jQuery
        new nowpadClient({
            pad: document.getElementById('myTextarea')
        });
      
        // Or With jQuery
        $textarea = $('#myTextarea').nowpad();
    • Using NowPad with ACE

        new nowpadClient({
            pad: ace.edit('pad')
        });

Features

  • Sync the same textarea between multiple clients
  • Keep the cursor positions intact
  • Only the difference is sent between clients
  • Data will always remain intact between clients (it will never get corrupted)
  • Potential to work with HTML as well as Text
  • Plug and play with the node.js package

Todo

The roadmap lays here

History

  • v0.8 April 29, 2011

    • Nowpad now works with ACE and TextAreas
  • v0.7 April 29, 2011

    • Nowpad is now a npm package
  • v0.6

    • Greatly improved performance
  • v0.5

    • Ignores internet explorer and console less browsers
    • Now will only apply syncs once the user has finished typing
  • v0.4

    • New algorithm which ensures data will never get corrupted
  • v0.3

    • Server now keeps a copy of the document
  • v0.2

    • Working on a type together basis with two people
  • v0.1

    • Working on a start and stop basis

License

Licensed under the MIT License Copyright 2011 Benjamin Arthur Lupton