Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

selective-undo-text

ktsn22MIT0.2.0TypeScript support: included

A Selective Undo library for text editing

selective, undo, redo, text, editing, operation

readme

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