recorder.js
A textual recorder for textareas and text editors
Usage
<script src="dist/recorder.min.js"></script>
Note: All recorder types are accessible via window.Recorder
.
HTML Textarea
// Set up the recorder to track text changesvar recorder = HTMLTextAreaElement; // Play the recording back into the supplied element (using 2x speed)recorder;
CodeMirror Editor
// editorInstance = CodeMirror(yourElement); var recorder = editorInstance; // Playback via another Codemirror instance or a textarea if you prefer (at 1x speed, by default)recorder;
Ace Editor
// editorInstance = ace.edit(yourElement); var recorder = editorInstance; // Playback via another Ace instance or a textarea if you preferrecorder;
Additional commands
// Clear the last recordingrecorderclear // Get a JSON representation of the deltasrecorder;
Contributing
This lib uses browserify to generate the browser bundle.
To get the environment set up:
- Fork this repo
- Run
npm install
within the root - Run
make
to generate a distribution bundle and update the demo appdemo/
- Run
make watchify
to have watchify rebundle the app while you write code
License
MIT