Git Product home page Git Product logo

firepad's Introduction

Visit firepad.io for demo, examples, and embedding docs!

Read on if you'd like to contribute to Firepad.

Setting Up Your Environment

Firepad uses grunt to automate some build tasks (generating / minifying firepad.js, etc.). So before you get started, you'll need node.js installed. Then you can simply clone the repo, install the necessary node modules, and run grunt:

git clone https://github.com/firebase/firepad.git
cd firepad
npm install
sudo npm install -g grunt-cli
grunt

Source Code

To get started, here are some highlights of the directory structure and notable source files:

  • build/ - output directory for all files generated by grunt (firepad.js, firepad-min.js, firepad.zip, etc.).
  • examples - examples of embedding Firepad.
  • lib/
    • firepad.js - Entry point for Firepad.
    • text-operation.js, client.js - Heart of the Operation Transformation implementation. Based on ot.js but extended to allow arbitrary attributes on text (for representing rich-text).
    • annotation-list.js - A data model for representing annotations on text (i.e. spans of text with a particular set of attributes).
    • rich-text-codemirror.js - Uses AnnotationList to track annotations on the text and maintain the appropriate set of markers on a CodeMirror instance.
    • firebase-adapter.js - handles integration with Firebase (appending operations, triggering retries, presence, etc.).
  • test/ - Jasmine tests for Firepad (many of these were borrowed from ot.js).

firepad's People

Contributors

mikelehen avatar

Watchers

James Cloos avatar SHIMIZU Taku avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.