An open API service indexing awesome lists of open source software.

https://github.com/fabioricali/undoo

Undo/redo manager
https://github.com/fabioricali/undoo

history history-management undo-redo

Last synced: 11 months ago
JSON representation

Undo/redo manager

Awesome Lists containing this project

README

          

# Undoo
Undo/redo manager


## Installation

### Node.js
```
npm install undoo --save
```

### Browser

#### Local
```html

```

#### CDN unpkg
```html

```

## Example

```javascript
const Undoo = require('undoo');

const myHistory = new Undoo();

myHistory
.save('one')
.save('two')
.save('three')
.save('four');

myHistory.undo((item)=>{
console.log(item); //=> three
});

myHistory.current(); //=> three

myHistory.redo((item)=>{
console.log(item); //=> four
});

```

## Use provider

```javascript
const Undoo = require('undoo');

const myHistory = new Undoo({
provider: () => document.getElementById('myTextArea').value
});

myHistory.save();

```
## Demo

Try now

## API

{{>main}}

## Changelog
You can view the changelog here

## License
Undoo is open-sourced software licensed under the MIT license

## Author
Fabio Ricali