Skip to content

ktsn/selective-undo-text

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

selective-undo-text

A Selective Undo library for text editing.

Demo

http://codepen.io/ktsn/pen/qZxdaY

Usage

import { Buffer } from 'selective-undo-text';

const buf = Buffer('Initial Text');

buf.addText(7, ' Input');
console.log(buf.text) // Initial Input Text

buf.removeText(0, 8);
console.log(buf.text); // Input Text

buf.undo(0);
console.log(buf.text); //  Text

License

MIT

About

A Selective Undo library for text editing

Resources

License

Stars

Watchers

Forks

Packages

No packages published