# @eyea/plugin-undo

> 撤销历史插件

Latest version **2.7.30** (published 2022-02-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @eyea/plugin-undo
pnpm add @eyea/plugin-undo
yarn add @eyea/plugin-undo
bun add @eyea/plugin-undo
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.7.30 |
| Published | 2022-02-18 |
| First published | 2022-02-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 1.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | me@aomao.com |
| Maintainers | eyea |

## Links

- npm: https://www.npmjs.com/package/@eyea/plugin-undo
- Repository: https://github.com/yanmao-cc/am-editor
- Homepage: https://github.com/yanmao-cc/am-editor#readme
- Issues: https://github.com/yanmao-cc/am-editor/issues
- npm.io page: https://npm.io/package/@eyea/plugin-undo

## Dependencies (2)

- [@aomao/engine](https://npm.io/package/@aomao/engine.md) ^2.7.30
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.13.10

## Recent versions

- 2.7.30 (latest) — 2022-02-18

## README

# @aomao/plugin-undo

撤销历史插件

## 安装

```bash
$ yarn add @aomao/plugin-undo
```

添加到引擎

```ts
import Engine, { EngineInterface } from '@aomao/engine';
import Undo from '@aomao/plugin-undo';

new Engine(...,{ plugins:[Undo] })
```

## 可选项

### 快捷键

默认快捷键为 `mod+z` `shift+mod+z`

```ts
//快捷键
hotkey?: string | Array<string>;
//使用配置
new Engine(...,{
    config:{
        "undo":{
            //修改快捷键
            hotkey:"快捷键"
        }
    }
 })
```

## 命令

```ts
//使用 command 执行插件、并传入所需参数
engine.command.execute('undo');
//使用 command 执行查询当前状态，返回 boolean | undefined
engine.command.queryState('undo');
```

---
_Source: https://npm.io/package/@eyea/plugin-undo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
